public interface ServicePermissionRule<S extends EntitySelection>
A class implementing this interface can be declared at two levels:
For more information, see the Programmatic permission on service documentation.
Modifier and Type | Field and Description |
---|---|
static ServicePermissionRule<EntitySelection> |
ALWAYS_DISABLED
Always returns the disabled permission (i.e both for display and execution contexts).
|
static ServicePermissionRule<EntitySelection> |
ALWAYS_ENABLED
Always returns the enabled permission (i.e for both display and execution contexts).
|
static ServicePermissionRule<EntitySelection> |
ENABLED_FOR_EXECUTION_ONLY
Returns the disabled permission for display context, but returns enabled for execution.
|
Modifier and Type | Method and Description |
---|---|
UserServicePermission |
getPermission(ServicePermissionRuleContext<S> aContext)
Returns a permission for the specified context.
|
static final ServicePermissionRule<EntitySelection> ALWAYS_ENABLED
static final ServicePermissionRule<EntitySelection> ENABLED_FOR_EXECUTION_ONLY
static final ServicePermissionRule<EntitySelection> ALWAYS_DISABLED
UserServicePermission getPermission(ServicePermissionRuleContext<S> aContext)
This method is called to evaluate permissions in two cases:
This method can be called simultaneously by several threads.
aContext
- the current context in which the permission has to be resolved.