|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.PermissionUtil
public class PermissionUtil
Collection of methods for handling permission related processing.
Constructor Summary | |
---|---|
PermissionUtil()
|
Method Summary | |
---|---|
static AccessManager |
getAccessManager(String workspace,
Subject subject)
Creates instance of AccessManager configured with subject principal permissions for requested workspace/repository. |
static boolean |
isGranted(javax.jcr.Node node,
long requiredPermissions)
Convenience call hiding all ugly details of permission conversions. |
static boolean |
isGranted(javax.jcr.Session jcrSession,
String path,
long oldPermissions)
Return whether given session has requested permission on provided path. |
static boolean |
isGranted(javax.jcr.Session jcrSession,
String path,
String action)
Return whether given session has requested permission on provided path. |
static boolean |
isGranted(String workspace,
String path,
String requiredPermissions)
Convenience call hiding all ugly details of permission conversions. |
static void |
verifyIsGrantedOrThrowException(javax.jcr.Session jcrSession,
String path,
String action)
Checks whether given session has requested permission on provided path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionUtil()
Method Detail |
---|
public static AccessManager getAccessManager(String workspace, Subject subject)
public static boolean isGranted(javax.jcr.Node node, long requiredPermissions) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- in case node or its parent session is invalid.public static boolean isGranted(String workspace, String path, String requiredPermissions)
public static boolean isGranted(javax.jcr.Session jcrSession, String path, long oldPermissions)
public static boolean isGranted(javax.jcr.Session jcrSession, String path, String action)
IllegalArgumentException
- when provided action is empty.public static void verifyIsGrantedOrThrowException(javax.jcr.Session jcrSession, String path, String action) throws AccessDeniedException
AccessDeniedException
- when permission is not granted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |