public interface PermissionChecker
PermissionChecker is responsible for granting/denying access of various callers to different contexts.| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
canActivate(Permissions has,
Permissions need,
ContextManager cm)
Checks whether the calling party (those permissions are identified by
has) can set permissions of some other party to need. |
boolean |
canSee(Permissions perms,
java.lang.String context,
ContextManager cm)
Returns true if the calling party (those permissions are identified by
perms) can see context among children of its parent context because it has non-null permissions for one or
more direct/nested children of context. |
java.lang.String |
getLevel(Permissions permissions,
java.lang.String accessedContext,
java.lang.Integer accessedEntityType,
java.lang.String accessedEntity,
java.lang.String accessedEntityGroup,
ContextManager cm)
Returns the effective permission level of the calling party (those permissions are identified by
permissions) for the entity. |
java.util.Map<java.lang.Object,java.lang.String> |
getPermissionLevels()
Returns a map of all permission levels supported by the checker.
|
java.util.Map<java.lang.String,java.lang.String> |
getRolePermissionLevels(int entityType)
Returns a map of all supported permission levels for the specified entity type.
|
boolean |
has(CallerController caller,
Permissions requiredPermissions,
Context accessedContext,
EntityDefinition accessedEntityDefinition)
Returns true if
caller is allowed to access an entity those permissions are requiredPermissions. |
boolean |
isValid(java.lang.String permissionLevel)
Returns true if permission level
permissionLevel is supported by the checker. |
java.util.Map<java.lang.Object,java.lang.String> getPermissionLevels()
java.util.Map<java.lang.String,java.lang.String> getRolePermissionLevels(int entityType)
boolean isValid(java.lang.String permissionLevel)
permissionLevel is supported by the checker.boolean has(CallerController caller, Permissions requiredPermissions, Context accessedContext, EntityDefinition accessedEntityDefinition)
caller is allowed to access an entity those permissions are requiredPermissions.java.lang.String getLevel(Permissions permissions, java.lang.String accessedContext, java.lang.Integer accessedEntityType, java.lang.String accessedEntity, java.lang.String accessedEntityGroup, ContextManager cm)
permissions) for the entity.boolean canSee(Permissions perms, java.lang.String context, ContextManager cm)
perms) can see context among children of its parent context because it has non-null permissions for one or
more direct/nested children of context.java.lang.String canActivate(Permissions has, Permissions need, ContextManager cm)
has) can set permissions of some other party to need.