public final class RBACUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static JCRNodeWrapper |
getOrCreatePermission(String path,
JCRSessionWrapper session)
Deprecated.
Creates the specified permission if it does not exist yet.
|
static JCRNodeWrapper |
getOrCreateRole(String path,
JCRSessionWrapper session)
Deprecated.
Creates the specified role if it does not exist yet.
|
static boolean |
grantPermissionToRole(String permissionPath,
String rolePath,
JCRSessionWrapper session)
Deprecated.
Grants the specified permission to the role.
|
static boolean |
hasPermission(String rolePath,
String permissionPath,
JCRSessionWrapper session)
Deprecated.
Checks if the specified permissions is already grated to the role.
|
static boolean |
revokePermissionFromRole(String permissionPath,
String rolePath,
JCRSessionWrapper session)
Deprecated.
Grants the specified permission to the role.
|
public static JCRNodeWrapper getOrCreatePermission(String path, JCRSessionWrapper session) throws javax.jcr.RepositoryException
Session.save() is not called by this method; it is the responsibility of the caller.path - the path of the permission to get/createsession - current JCR sessionjavax.jcr.RepositoryException - in case of an errorpublic static JCRNodeWrapper getOrCreateRole(String path, JCRSessionWrapper session) throws javax.jcr.RepositoryException
Session.save() is not called by this method; it is the
responsibility of the caller.path - the path of the role to get/createsession - current JCR sessionjavax.jcr.RepositoryException - in case of an errorpublic static boolean grantPermissionToRole(String permissionPath, String rolePath, JCRSessionWrapper session) throws javax.jcr.RepositoryException
Session.save() is not called
by this method; it is the responsibility of the caller.permissionPath - the path of the permission to be grantedrolePath - the path of the role the permission should be granted tosession - current JCR sessiontrue if any modification was done; if the role already has that permission assigned, false is
returned.javax.jcr.RepositoryException - in case of an errorpublic static boolean hasPermission(String rolePath, String permissionPath, JCRSessionWrapper session) throws javax.jcr.RepositoryException
rolePath - the path of the role the permission should be checked forpermissionPath - the path of the permission to be checkedsession - current JCR sessiontrue if the role already contains the permission, false otherwisejavax.jcr.RepositoryException - in case of an errorpublic static boolean revokePermissionFromRole(String permissionPath, String rolePath, JCRSessionWrapper session) throws javax.jcr.RepositoryException
Session.save() is not called
by this method; it is the responsibility of the caller.permissionPath - the path of the permission to be grantedrolePath - the path of the role the permission should be granted tosession - current JCR sessiontrue if any modification was done; if the role already has that permission assigned, false is
returned.javax.jcr.RepositoryException - in case of an errorCopyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.