public class DefaultPermissionProvider extends Object implements PermissionProviderLocal
Constructor and Description |
---|
DefaultPermissionProvider() |
Modifier and Type | Method and Description |
---|---|
protected Set<String> |
computeAllGroups(String permissionName,
Set<String> alreadyProcessed) |
protected void |
computeMergedGroups() |
protected void |
computeMergedPermissions() |
protected void |
computeMergedPermissionsVisibility() |
String[] |
getAliasPermissions(String perm) |
protected MergedPermissionDescriptor |
getPermission(String perm) |
String[] |
getPermissionGroups(String perm) |
String[] |
getPermissions() |
String[] |
getSubPermissions(String perm) |
List<UserVisiblePermission> |
getUserVisiblePermissionDescriptors() |
List<UserVisiblePermission> |
getUserVisiblePermissionDescriptors(String typeName) |
void |
registerDescriptor(PermissionDescriptor descriptor) |
void |
registerDescriptor(PermissionVisibilityDescriptor descriptor) |
void |
unregisterDescriptor(PermissionDescriptor descriptor) |
void |
unregisterDescriptor(PermissionVisibilityDescriptor descriptor) |
public DefaultPermissionProvider()
public List<UserVisiblePermission> getUserVisiblePermissionDescriptors(String typeName)
getUserVisiblePermissionDescriptors
in interface PermissionProvider
typeName
- the name of a Core type of the document whose ACP is to be edited by the userpublic List<UserVisiblePermission> getUserVisiblePermissionDescriptors()
getUserVisiblePermissionDescriptors
in interface PermissionProvider
protected void computeMergedPermissionsVisibility()
public String[] getSubPermissions(String perm)
getSubPermissions
in interface PermissionProvider
perm
- the name of a registered compound permissionpublic String[] getAliasPermissions(String perm)
getAliasPermissions
in interface PermissionProvider
perm
- the name of a registered permissionprotected MergedPermissionDescriptor getPermission(String perm)
public String[] getPermissionGroups(String perm)
getPermissionGroups
in interface PermissionProvider
perm
- the name of a registered permissions that belongs to permission groups (aka compound permissions)protected void computeMergedGroups()
protected Set<String> computeAllGroups(String permissionName, Set<String> alreadyProcessed)
public String[] getPermissions()
getPermissions
in interface PermissionProvider
protected void computeMergedPermissions()
public void registerDescriptor(PermissionDescriptor descriptor)
registerDescriptor
in interface PermissionProviderLocal
public void unregisterDescriptor(PermissionDescriptor descriptor)
unregisterDescriptor
in interface PermissionProviderLocal
public void registerDescriptor(PermissionVisibilityDescriptor descriptor)
registerDescriptor
in interface PermissionProviderLocal
public void unregisterDescriptor(PermissionVisibilityDescriptor descriptor)
unregisterDescriptor
in interface PermissionProviderLocal
Copyright © 2018 Nuxeo. All rights reserved.