public abstract static class PermissionBackend.ForChange extends PermissionBackend.AcceptsReviewDb<PermissionBackend.ForChange>
db
Constructor and Description |
---|
ForChange() |
Modifier and Type | Method and Description |
---|---|
abstract void |
check(ChangePermissionOrLabel perm)
Verify scoped user can
perm , throwing if denied. |
boolean |
test(ChangePermissionOrLabel perm) |
abstract <T extends ChangePermissionOrLabel> |
test(java.util.Collection<T> permSet)
Filter
permSet to permissions scoped user might be able to perform. |
java.util.Set<LabelPermission.WithValue> |
test(LabelType label)
Test which values of a label the user may be able to set.
|
BooleanCondition |
testCond(ChangePermissionOrLabel perm) |
java.util.Set<LabelPermission.WithValue> |
testLabels(java.util.Collection<LabelType> types)
Test which values of a group of labels the user may be able to set.
|
boolean |
testOrFalse(ChangePermissionOrLabel perm)
Test if user may be able to perform the permission.
|
abstract CurrentUser |
user() |
abstract PermissionBackend.ForChange |
user(CurrentUser user) |
database, database
public abstract CurrentUser user()
public abstract PermissionBackend.ForChange user(CurrentUser user)
user
.public abstract void check(ChangePermissionOrLabel perm) throws AuthException, PermissionBackendException
perm
, throwing if denied.public abstract <T extends ChangePermissionOrLabel> java.util.Set<T> test(java.util.Collection<T> permSet) throws PermissionBackendException
permSet
to permissions scoped user might be able to perform.PermissionBackendException
public boolean test(ChangePermissionOrLabel perm) throws PermissionBackendException
PermissionBackendException
public boolean testOrFalse(ChangePermissionOrLabel perm)
Similar to test(ChangePermissionOrLabel)
except this method returns false
instead of throwing an exception.
perm
- the permission to test.public BooleanCondition testCond(ChangePermissionOrLabel perm)
public java.util.Set<LabelPermission.WithValue> test(LabelType label) throws PermissionBackendException
label
- definition of the label to test values of.PermissionBackendException
- if failure consulting backend configuration.public java.util.Set<LabelPermission.WithValue> testLabels(java.util.Collection<LabelType> types) throws PermissionBackendException
types
- definition of the labels to test values of.PermissionBackendException
- if failure consulting backend configuration.