Disable capability endpoints when not using default backend
The capability names exposed by these endpoints are implementation details of the DefaultPermissionBackend. A different implementation may choose to hide the GlobalPermission enum names from the user entirely, so it doesn't make sense to expose them. Change-Id: I69ea38064ccbf1c04a976e7bcb4629ab5d66aeef
This commit is contained in:
@@ -84,6 +84,11 @@ public class DefaultPermissionBackend extends PermissionBackend {
|
||||
return new WithUserImpl(identifiedUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean usesDefaultCapabilities() {
|
||||
return true;
|
||||
}
|
||||
|
||||
class WithUserImpl extends WithUser {
|
||||
private final CurrentUser user;
|
||||
private Boolean admin;
|
||||
|
Reference in New Issue
Block a user