Class ACPImpl
- All Implemented Interfaces:
Serializable
,Cloneable
,ACP
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
ConfigurationService property to enable legacy behavior. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAccessRule
(String aclName, ACE ace) boolean
Add an ACE to the givenaclName
.void
void
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.boolean
blockInheritance
(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 Access
ACL[]
getACLs()
getMergedACLs
(String name) getOrCreateACL
(String name) static ACL
boolean
Remove an ACE on the givenaclName
.boolean
removeACEsByUsername
(String username) Remove all ACEs forusername
on the whole ACP.boolean
removeACEsByUsername
(String aclName, String username) Remove all ACEs forusername
on the givenaclName
.boolean
replaceACE
(String aclName, ACE oldACE, ACE newACE) Replace theoldACE
withnewACE
on the givenaclName
, only if theoldACE
exists.void
replacePermission
(String oldPerm, String newPerm) Replaces a permission with another in this ACP.void
Replaces the modifiable user entries (associated with the currentDocument) related to the ACP.void
Replaces the modifiable user entries (associated with the currentDocument) related to the ACP.void
Replaces the modifiable user entries (associated with the currentDocument) related to the current ACP.void
Replaces the modifiable user entries (associated with the currentDocument) related to the current ACP.boolean
unblockInheritance
(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:
getMergedACLs
in interfaceACP
-
newACL
-
removeACL
-
getAccess
Description copied from interface:ACP
Check 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:ACP
Checks 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:
getOrCreateACL
in interfaceACP
-
getOrCreateACL
- Specified by:
getOrCreateACL
in interfaceACP
-
setRules
Description copied from interface:ACP
Replaces 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:ACP
Replaces 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:ACP
Replaces 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:ACP
Replaces 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:ACP
Return a recursive copy of the ACP sharing no mutable substructure with the original -
blockInheritance
Description copied from interface:ACP
Block the inheritance on the givenaclName
.- Specified by:
blockInheritance
in interfaceACP
username
- the user blocking the inheritance- Returns:
- true if the ACP was changed.
-
unblockInheritance
Description copied from interface:ACP
Unblock the inheritance on the givenaclName
.- Specified by:
unblockInheritance
in interfaceACP
- Returns:
- true if the ACP was changed.
-
addACE
Description copied from interface:ACP
Add an ACE to the givenaclName
. -
replaceACE
Description copied from interface:ACP
Replace theoldACE
withnewACE
on the givenaclName
, only if theoldACE
exists.The
newACE
keeps the same index asoldACE
.- Specified by:
replaceACE
in interfaceACP
- Returns:
- true if the ACP was changed.
-
removeACE
Description copied from interface:ACP
Remove an ACE on the givenaclName
. -
removeACEsByUsername
Description copied from interface:ACP
Remove all ACEs forusername
on the givenaclName
.- Specified by:
removeACEsByUsername
in interfaceACP
- Returns:
- true if the ACP was changed.
-
removeACEsByUsername
Description copied from interface:ACP
Remove all ACEs forusername
on the whole ACP.- Specified by:
removeACEsByUsername
in interfaceACP
- Returns:
- true if the ACP was changed.
-
replacePermission
Description copied from interface:ACP
Replaces a permission with another in this ACP.- Specified by:
replacePermission
in interfaceACP
- Parameters:
oldPerm
- the old permissionnewPerm
- the new permission
-
useLegacyBehavior
protected boolean useLegacyBehavior()
-