Interface PermissionEvaluator<S,R>
- All Known Implementing Classes:
PermissionEvaluatorImpl
public interface PermissionEvaluator<S,R>
Evaluates or checks permissions.
- Author:
- avasquez
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the current subject (according toSubjectResolver
) is allowed to perform the specified action on the given resource.boolean
Checks if the given subject is allowed to perform the specified action on the given resource
-
Method Details
-
isAllowed
Checks if the current subject (according toSubjectResolver
) is allowed to perform the specified action on the given resource.- Parameters:
resource
- the resource or ID/IDs of the resource whose permissions should be checked. If null, the global permission should be checkedaction
- the action the subject wants to perform (not null)- Returns:
- true if the subject is allowed to execute the action, false otherwise
- Throws:
PermissionException
-
isAllowed
Checks if the given subject is allowed to perform the specified action on the given resource- Parameters:
subject
- the subject (not null)resource
- the resource or ID/IDs of the resource whose permissions should be checked. If null, the global permission should be checkedaction
- the action the subject wants to perform (not null)- Returns:
- true if the subject is allowed to execute the action, false otherwise
- Throws:
PermissionException
-