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. |
abstract java.lang.String |
resourcePath()
Returns the fully qualified resource path that this instance is scoped to.
|
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.
|
abstract 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.
|
database, database
public abstract java.lang.String resourcePath()
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 abstract 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.