public class MgnlRoleManager extends RepositoryBackedSecurityManager implements RoleManager
RepositoryConstants.USER_ROLES
workspace.Modifier and Type | Field and Description |
---|---|
static String |
NODE_ACLROLES |
Constructor and Description |
---|
MgnlRoleManager() |
Modifier and Type | Method and Description |
---|---|
void |
addPermission(Role role,
String workspace,
String path,
long permission)
Add permission to the specified role, assuming current user has enough rights to perform such operation.
|
Role |
createRole(String name)
Creates a new role in the root folder without any security restrictions.
|
Role |
createRole(String path,
String name)
Create a new role in a specific folder without any security restrictions.
|
protected javax.jcr.Node |
findPrincipalNode(String principalName,
javax.jcr.Session session)
Helper method to find a role.
|
protected HierarchyManager |
getHierarchyManager()
Deprecated.
since 5.2
|
protected String |
getRepositoryName() |
Role |
getRole(String name)
Get the specific role.
|
String |
getRoleNameById(String string)
Retrieve role name by its identifier.
|
protected MgnlRole |
newRoleInstance(Content node)
Deprecated.
since 4.5
|
protected MgnlRole |
newRoleInstance(javax.jcr.Node node) |
void |
removePermission(Role role,
String workspace,
String path,
long permission)
Remove permission from the specified role.
|
protected void |
validateRoleName(String name) |
add, findPrincipalNode, findPrincipalNode, findPrincipalNodes, findUsersOrGroupsHavingAssignedGroupOrRoleWithUid, getACLs, getACLs, getResourceName, hasAny, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getACLs
public static final String NODE_ACLROLES
public Role getRole(String name)
RoleManager
getRole
in interface RoleManager
public Role createRole(String name) throws AccessDeniedException
RoleManager
createRole
in interface RoleManager
AccessDeniedException
public Role createRole(String path, String name) throws AccessDeniedException
createRole
in interface RoleManager
IllegalArgumentException
- if the name is not valid or if a group with this name already existsUnsupportedOperationException
- in case the role manager does not support this operationAccessDeniedException
@Deprecated protected MgnlRole newRoleInstance(Content node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected MgnlRole newRoleInstance(javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
@Deprecated protected HierarchyManager getHierarchyManager()
public void removePermission(Role role, String workspace, String path, long permission)
RoleManager
removePermission
in interface RoleManager
public void addPermission(Role role, String workspace, String path, long permission)
RoleManager
addPermission
in interface RoleManager
protected javax.jcr.Node findPrincipalNode(String principalName, javax.jcr.Session session) throws javax.jcr.RepositoryException
findPrincipalNode
in class RepositoryBackedSecurityManager
javax.jcr.RepositoryException
protected String getRepositoryName()
getRepositoryName
in class RepositoryBackedSecurityManager
public String getRoleNameById(String string)
RoleManager
getRoleNameById
in interface RoleManager
protected void validateRoleName(String name) throws AccessDeniedException
AccessDeniedException
Copyright © 2003–2016 Magnolia International Ltd.. All rights reserved.