Package org.nuxeo.ecm.core.security
Class DefaultPermissionProvider
java.lang.Object
org.nuxeo.ecm.core.security.DefaultPermissionProvider
- All Implemented Interfaces:
PermissionProvider
,PermissionProviderLocal
- Author:
- Bogdan Stefanescu, Olivier Grisel
-
Field Summary
Modifier and TypeFieldDescription -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncomputeAllGroups
(String permissionName, Set<String> alreadyProcessed) protected void
protected void
protected void
String[]
getAliasPermissions
(String perm) protected MergedPermissionDescriptor
getPermission
(String perm) String[]
getPermissionGroups
(String perm) String[]
String[]
getSubPermissions
(String perm) getUserVisiblePermissionDescriptors
(String typeName) void
registerDescriptor
(PermissionDescriptor descriptor) void
registerDescriptor
(PermissionVisibilityDescriptor descriptor) void
unregisterDescriptor
(PermissionDescriptor descriptor) void
unregisterDescriptor
(PermissionVisibilityDescriptor descriptor)
-
Field Details
-
mergedPermissionsVisibility
-
-
Constructor Details
-
DefaultPermissionProvider
public DefaultPermissionProvider()
-
-
Method Details
-
getUserVisiblePermissionDescriptors
- Specified by:
getUserVisiblePermissionDescriptors
in interfacePermissionProvider
- Parameters:
typeName
- the name of a Core type of the document whose ACP is to be edited by the user- Returns:
- get the sorted list of UserVisiblePermission objects to be used in the permission management screen of the UI (be it web based, a rich client or any-thing else) ; if no specific permissions are registered for typeName, the default list is returned
-
getUserVisiblePermissionDescriptors
- Specified by:
getUserVisiblePermissionDescriptors
in interfacePermissionProvider
- Returns:
- get the sorted list of UserVisiblePermission objects to be used in the permission management screen of the UI (be it web based, a rich client or any-thing else)
-
computeMergedPermissionsVisibility
protected void computeMergedPermissionsVisibility() -
getSubPermissions
- Specified by:
getSubPermissions
in interfacePermissionProvider
- Parameters:
perm
- the name of a registered compound permission- Returns:
- the list of permission names of sub-permissions of 'perm'
-
getAliasPermissions
- Specified by:
getAliasPermissions
in interfacePermissionProvider
- Parameters:
perm
- the name of a registered permission- Returns:
- the list of alias permissions to 'perm'
-
getPermission
-
getPermissionGroups
- Specified by:
getPermissionGroups
in interfacePermissionProvider
- Parameters:
perm
- the name of a registered permissions that belongs to permission groups (aka compound permissions)- Returns:
- an array of a all compound permissions 'perm' is a sub-permission of, directly or not ; returns null if 'perm' is not registered or if 'perm' does not belong to any compound permission
-
computeMergedGroups
protected void computeMergedGroups() -
computeAllGroups
-
getPermissions
- Specified by:
getPermissions
in interfacePermissionProvider
- Returns:
- an array of a all registered permission names
-
computeMergedPermissions
protected void computeMergedPermissions() -
registerDescriptor
- Specified by:
registerDescriptor
in interfacePermissionProviderLocal
-
unregisterDescriptor
- Specified by:
unregisterDescriptor
in interfacePermissionProviderLocal
-
registerDescriptor
- Specified by:
registerDescriptor
in interfacePermissionProviderLocal
-
unregisterDescriptor
- Specified by:
unregisterDescriptor
in interfacePermissionProviderLocal
-