Package org.bremersee.acl
Interface AccessEvaluator
- All Known Implementing Classes:
AccessEvaluator.Impl
public interface AccessEvaluator
The access evaluator.
- Author:
- Christian Bremer
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThe default access evaluator implementation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasPermission(AclUserContext userContext, String permission) Determines whether the given user with the given roles and groups has the specified permission.default booleanhasPermissions(AclUserContext userContext, AccessEvaluation accessEvaluation, Collection<String> permissions) Determines whether the given user with the given roles and groups has the specified permissions according to the given access evaluation type.static AccessEvaluatorCreates an access evaluator from the given access control list.
-
Method Details
-
of
Creates an access evaluator from the given access control list.- Parameters:
acl- the access control list- Returns:
- the access evaluator
-
hasPermission
Determines whether the given user with the given roles and groups has the specified permission.- Parameters:
userContext- the user contextpermission- the permission- Returns:
trueif the user has the permission, otherwisefalse
-
hasPermissions
default boolean hasPermissions(AclUserContext userContext, AccessEvaluation accessEvaluation, Collection<String> permissions) Determines whether the given user with the given roles and groups has the specified permissions according to the given access evaluation type.- Parameters:
userContext- the user contextaccessEvaluation- the access evaluation typepermissions- the permissions- Returns:
trueif the user has the permissions, otherwisefalse
-