Class ACPImpl
- All Implemented Interfaces:
Serializable,Cloneable,ACP
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConfigurationService property to enable legacy behavior. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAccessRule(String aclName, ACE ace) booleanAdd an ACE to the givenaclName.voidvoidThis method must append the ACL and not insert it since it is used to append the inherited ACL which is the less significant ACL.booleanblockInheritance(String aclName, String username) Block the inheritance on the givenaclName.clone()Return a recursive copy of the ACP sharing no mutable substructure with the originalChecks the access on the ACLs for each set of the given permissions and principals.Check whether this ACP grant the given permission on the given user, denies it or doesn't specify a rule.static AccessACL[]getACLs()getMergedACLs(String name) getOrCreateACL(String name) static ACLbooleanRemove an ACE on the givenaclName.booleanremoveACEsByUsername(String username) Remove all ACEs forusernameon the whole ACP.booleanremoveACEsByUsername(String aclName, String username) Remove all ACEs forusernameon the givenaclName.booleanreplaceACE(String aclName, ACE oldACE, ACE newACE) Replace theoldACEwithnewACEon the givenaclName, only if theoldACEexists.voidreplacePermission(String oldPerm, String newPerm) Replaces a permission with another in this ACP.voidReplaces the modifiable user entries (associated with the currentDocument) related to the ACP.voidReplaces the modifiable user entries (associated with the currentDocument) related to the ACP.voidReplaces the modifiable user entries (associated with the currentDocument) related to the current ACP.voidReplaces the modifiable user entries (associated with the currentDocument) related to the current ACP.booleanunblockInheritance(String aclName) Unblock the inheritance on the givenaclName.protected boolean
-
Field Details
-
LEGACY_BEHAVIOR_PROPERTY
ConfigurationService property to enable legacy behavior.- Since:
- 10.2
- See Also:
-
-
Constructor Details
-
ACPImpl
public ACPImpl()
-
-
Method Details
-
addACL
This method must append the ACL and not insert it since it is used to append the inherited ACL which is the less significant ACL. -
addACL
-
getACL
-
getACLs
-
getMergedACLs
- Specified by:
getMergedACLsin interfaceACP
-
newACL
-
removeACL
-
getAccess
Description copied from interface:ACPCheck whether this ACP grant the given permission on the given user, denies it or doesn't specify a rule.This is checking only the ACLs on that ACP. Parents if any are not checked.
-
getAccess
Description copied from interface:ACPChecks the access on the ACLs for each set of the given permissions and principals.This differs for an iterative check using getAccess(String principal, String permission) in the order of checks - so that in this case each ACE is fully checked against the given users and permissions before passing to the next ACE.
-
getAccess
-
addAccessRule
-
getOrCreateACL
- Specified by:
getOrCreateACLin interfaceACP
-
getOrCreateACL
- Specified by:
getOrCreateACLin interfaceACP
-
setRules
Description copied from interface:ACPReplaces the modifiable user entries (associated with the currentDocument) related to the ACP.Considers that all the passed entries are modifiable and attempts to set them as entries related to the current document.
-
setRules
Description copied from interface:ACPReplaces the modifiable user entries (associated with the currentDocument) related to the ACP.Considers that all the passed entries are modifiable and attempts to set them as entries related to the current document.
-
setRules
Description copied from interface:ACPReplaces the modifiable user entries (associated with the currentDocument) related to the current ACP.Considers that all the passed entries are modifiable and attempts to set them as local entries related to the current document.
-
setRules
Description copied from interface:ACPReplaces the modifiable user entries (associated with the currentDocument) related to the current ACP.Considers that all the passed entries are modifiable and attempts to set them as local entries related to the current document.
The current behavior reset completely the current ACL.
-
clone
Description copied from interface:ACPReturn a recursive copy of the ACP sharing no mutable substructure with the original -
blockInheritance
Description copied from interface:ACPBlock the inheritance on the givenaclName.- Specified by:
blockInheritancein interfaceACPusername- the user blocking the inheritance- Returns:
- true if the ACP was changed.
-
unblockInheritance
Description copied from interface:ACPUnblock the inheritance on the givenaclName.- Specified by:
unblockInheritancein interfaceACP- Returns:
- true if the ACP was changed.
-
addACE
Description copied from interface:ACPAdd an ACE to the givenaclName. -
replaceACE
Description copied from interface:ACPReplace theoldACEwithnewACEon the givenaclName, only if theoldACEexists.The
newACEkeeps the same index asoldACE.- Specified by:
replaceACEin interfaceACP- Returns:
- true if the ACP was changed.
-
removeACE
Description copied from interface:ACPRemove an ACE on the givenaclName. -
removeACEsByUsername
Description copied from interface:ACPRemove all ACEs forusernameon the givenaclName.- Specified by:
removeACEsByUsernamein interfaceACP- Returns:
- true if the ACP was changed.
-
removeACEsByUsername
Description copied from interface:ACPRemove all ACEs forusernameon the whole ACP.- Specified by:
removeACEsByUsernamein interfaceACP- Returns:
- true if the ACP was changed.
-
replacePermission
Description copied from interface:ACPReplaces a permission with another in this ACP.- Specified by:
replacePermissionin interfaceACP- Parameters:
oldPerm- the old permissionnewPerm- the new permission
-
useLegacyBehavior
protected boolean useLegacyBehavior()
-