public class MgnlRoleManager extends RepositoryBackedSecurityManager implements RoleManager
RepositoryConstants.USER_ROLES
workspace.Modifier and Type | Field and Description |
---|---|
static String |
NODE_ACLROLES |
nodeNameHelper
Constructor and Description |
---|
MgnlRoleManager()
Deprecated.
since 5.5.3, use
MgnlRoleManager(NodeNameHelper) instead. |
MgnlRoleManager(NodeNameHelper nodeNameHelper) |
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 String |
getRepositoryName() |
Role |
getRole(String name)
Get the specific role.
|
String |
getRoleNameById(String string)
Retrieve role name by its identifier.
|
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
@Inject public MgnlRoleManager(NodeNameHelper nodeNameHelper)
@Deprecated public MgnlRoleManager()
MgnlRoleManager(NodeNameHelper)
instead.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
protected MgnlRole newRoleInstance(javax.jcr.Node node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
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–2018 Magnolia International Ltd.. All rights reserved.