public interface PermissionEvaluationService
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRead(Object object)
short hand for hasRoleOrPermissionOnObject('ROLE_ADMIN', 'READ', object);
|
boolean |
hasMoreThanRead(Object object)
return true if the user has more than readonly on the object
|
boolean |
hasPermissionOnObject(String permission,
Long entityId,
String entityClassName)
returns
true if the current user has the given permission on the object of the given id and classname. |
boolean |
hasPermissionOnObject(String permission,
Object entity) |
boolean |
hasRole(String role)
return true if the user has the given role.
|
boolean |
hasRoleOrPermissionOnObject(String role,
String permission,
Long entityId,
String entityClassName)
Same as
hasRoleOrPermissionOnObject(String, String, Object), except that Object is explicitly identified
by its ID and classname |
boolean |
hasRoleOrPermissionOnObject(String role,
String permission,
Object object) |
Map<String,Boolean> |
hasRoleOrPermissionsOnObject(String role,
String[] permissions,
Object entity) |
Collection<String> |
permissionsOn(String className,
long id)
returns the list of all permissions the curent user has on en entity refernced by its classname and identifier.
|
boolean hasRoleOrPermissionOnObject(String role, String permission, Object object)
role - permission - String representation of the permission.object - boolean hasPermissionOnObject(String permission, Object entity)
permission - String representation of the permission.entity - boolean hasRoleOrPermissionOnObject(String role, String permission, Long entityId, String entityClassName)
hasRoleOrPermissionOnObject(String, String, Object), except that Object is explicitly identified
by its ID and classnamerole - permission - entityId - entityClassName - boolean canRead(Object object)
object - boolean hasMoreThanRead(Object object)
object - boolean hasRole(String role)
role - boolean hasPermissionOnObject(String permission, Long entityId, String entityClassName)
true if the current user has the given permission on the object of the given id and classname.permission - entityId - entityClassName - true if the current user has the given permission on the object of the given id and classname.Map<String,Boolean> hasRoleOrPermissionsOnObject(String role, String[] permissions, Object entity)
permissions - String representation of the permission.entity - Collection<String> permissionsOn(@NotNull String className, long id)
className - class name of the entityid - identifier of the entityCopyright © 2010–2017 Henix, henix.fr. All rights reserved.