Interface PermissionResolver<S,R>
public interface PermissionResolver<S,R>
Resolves the permissions for a particular type of subjects and resources.
- Author:
- avasquez
-
Method Summary
Modifier and TypeMethodDescriptiongetGlobalPermission
(S subject) Returns the global permission (that applies to any or all resources) associated to the given subject.getPermission
(S subject, R resource) Returns the permission associated to the given subject and resource.
-
Method Details
-
getGlobalPermission
Returns the global permission (that applies to any or all resources) associated to the given subject.- Parameters:
subject
- the subject- Returns:
- the global permission, or null if no permission found
- Throws:
PermissionException
-
getPermission
Returns the permission associated to the given subject and resource.- Parameters:
subject
- the subject (not null)resource
- the protected resource or ID/IDs of the protected resource (not null).- Returns:
- the object/subject permission, or null if no permission found
- Throws:
PermissionException
-