org.squashtest.tm.service.internal.security
@Service(value="squashtest.core.security.PermissionEvaluationService") @Transactional(readOnly=true) public class AclPermissionEvaluationService extends Object implements PermissionEvaluationService
| Constructor and Description |
|---|
AclPermissionEvaluationService() |
| 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 permissionName,
Long entityId,
String entityClassName)
returns
true if the current user has the given permission on the object of the given id and classname. |
boolean |
hasRole(String role)
return true if the user has the given role.
|
boolean |
hasRoleOrPermissionOnObject(String role,
String permissionName,
Long entityId,
String entityClassName)
Same as
PermissionEvaluationService.hasRoleOrPermissionOnObject(String, String, Object), except that Object is explicitly identified
by its ID and classname |
boolean |
hasRoleOrPermissionOnObject(String role,
String permissionName,
Object object) |
Map<org.springframework.security.acls.model.Permission,Boolean> |
listPermissionsOnObject(Object object)
returns all existing permissions and says which of those the user is granted on the given object.
|
public boolean hasRoleOrPermissionOnObject(String role, String permissionName, Object object)
hasRoleOrPermissionOnObject in interface PermissionEvaluationServicepermissionName - String representation of the permission.public boolean hasRoleOrPermissionOnObject(String role, String permissionName, Long entityId, String entityClassName)
PermissionEvaluationServicePermissionEvaluationService.hasRoleOrPermissionOnObject(String, String, Object), except that Object is explicitly identified
by its ID and classnamehasRoleOrPermissionOnObject in interface PermissionEvaluationServicepublic boolean canRead(Object object)
PermissionEvaluationServicecanRead in interface PermissionEvaluationServicepublic boolean hasRole(String role)
PermissionEvaluationServicehasRole in interface PermissionEvaluationServicepublic boolean hasMoreThanRead(Object object)
PermissionEvaluationServicehasMoreThanRead in interface PermissionEvaluationServicepublic boolean hasPermissionOnObject(String permissionName, Long entityId, String entityClassName)
PermissionEvaluationServicetrue if the current user has the given permission on the object of the given id and classname.hasPermissionOnObject in interface PermissionEvaluationServicetrue if the current user has the given permission on the object of the given id and classname.public Map<org.springframework.security.acls.model.Permission,Boolean> listPermissionsOnObject(Object object)
PermissionEvaluationServicelistPermissionsOnObject in interface PermissionEvaluationServiceCopyright © 2010-2014 Henix, henix.fr. All Rights Reserved.