public class DefaultPermissionBackend extends PermissionBackend
PermissionBackend.ForChange, PermissionBackend.ForProject, PermissionBackend.ForRef, PermissionBackend.RefFilterOptions, PermissionBackend.WithUser
Modifier and Type | Method and Description |
---|---|
PermissionBackend.WithUser |
absentUser(Account.Id id)
Returns an instance scoped to the provided user.
|
PermissionBackend.WithUser |
currentUser()
Returns an instance scoped to the current user.
|
PermissionBackend.WithUser |
user(CurrentUser user)
Returns an instance scoped to the specified user.
|
boolean |
usesDefaultCapabilities()
Check whether this
PermissionBackend respects the same global capabilities as the
DefaultPermissionBackend . |
bulkEvaluateTest, checkUsesDefaultCapabilities
public PermissionBackend.WithUser currentUser()
PermissionBackend
currentUser
in class PermissionBackend
public PermissionBackend.WithUser user(CurrentUser user)
PermissionBackend
IllegalStateException
.
If an instance scoped to the current user is desired, use currentUser()
instead.
user
in class PermissionBackend
public PermissionBackend.WithUser absentUser(Account.Id id)
PermissionBackend
Usage should be very limited as this can expose a group-oracle.
absentUser
in class PermissionBackend
public boolean usesDefaultCapabilities()
PermissionBackend
PermissionBackend
respects the same global capabilities as the
DefaultPermissionBackend
.
If true, then it makes sense for downstream callers to refer to built-in Gerrit capability names in user-facing error messages, for example.
usesDefaultCapabilities
in class PermissionBackend