org.squashtest.tm.service.security
Class PermissionsUtils
java.lang.Object
org.squashtest.tm.service.security.PermissionsUtils
public final class PermissionsUtils
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
checkPermission
public static void checkPermission(PermissionEvaluationService permissionService,
SecurityCheckableObject... checkableObjects)
- Will check if the current user has sufficient rights on the given checkable objects. If not will throw an
AccessDeniedException.
- Parameters:
permissionService - : the PermissionEvaluationService to use to do the checkcheckableObjects - : the SecurityCheckableObjects to check
- Throws:
org.springframework.security.access.AccessDeniedException
checkPermission
public static void checkPermission(PermissionEvaluationService permissionService,
List<Long> ids,
String permission,
String entityClassName)
- Wil check if the current user has sufficient rights on the entities of the given ids and classname. If not, will
throw an
AccessDeniedException
- Parameters:
permissionService - : the PermissionEvaluationService to use to do the checkids - : the ids of the entities to check the permissions onpermission - : the permission name to checkentityClassName - : the classname of the entities to check
- Throws:
org.springframework.security.access.AccessDeniedException
Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.