public class ACPImpl extends Object implements ACP
| Constructor and Description |
|---|
ACPImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccessRule(String aclName,
ACE ace) |
void |
addACL(ACL acl)
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.
|
void |
addACL(int pos,
ACL acl) |
void |
addACL(String afterMe,
ACL acl) |
void |
addOwner(String owner) |
Object |
clone()
Return a recursive copy of the ACP sharing no mutable substructure with
the original
|
static Access |
getAccess(ACE ace,
String[] principals,
String[] permissions) |
Access |
getAccess(String[] principals,
String[] permissions)
Checks the access on the ACLs for each set of the given permissions and
principals.
|
Access |
getAccess(String principal,
String permission)
Check whether this ACP grant the given permission on the given user,
denies it or doesn't specify a rule.
|
ACL |
getACL(String name) |
ACL[] |
getACLs() |
ACL |
getMergedACLs(String name) |
ACL |
getOrCreateACL() |
ACL |
getOrCreateACL(String name) |
String[] |
getOwners() |
boolean |
isOwner(String username) |
String[] |
listUsernamesForAnyPermission(Set<String> perms)
Returns the usernames granted to perform an operation based on a list of
permissions.
|
String[] |
listUsernamesForPermission(String perm)
Returns the usernames having a given permission.
|
static ACL |
newACL(String name) |
ACL |
removeACL(String name) |
void |
removeOwner(String owner) |
void |
setOwners(String[] owners) |
void |
setRules(String aclName,
UserEntry[] userEntries)
Replaces the modifiable user entries (associated with the
currentDocument) related to the ACP.
|
void |
setRules(String aclName,
UserEntry[] userEntries,
boolean overwrite)
Replaces the modifiable user entries (associated with the
currentDocument) related to the ACP.
|
void |
setRules(UserEntry[] userEntries)
Replaces the modifiable user entries (associated with the
currentDocument) related to the current ACP.
|
void |
setRules(UserEntry[] userEntries,
boolean overwrite)
Replaces the modifiable user entries (associated with the
currentDocument) related to the current ACP.
|
public void removeOwner(String owner)
removeOwner in interface ACPpublic void addACL(ACL acl)
public ACL getMergedACLs(String name)
getMergedACLs in interface ACPpublic Access getAccess(String principal, String permission)
ACPThis is checking only the ACLs on that ACP. Parents if any are not checked.
public Access getAccess(String[] principals, String[] permissions)
ACPThis 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.
public ACL getOrCreateACL(String name)
getOrCreateACL in interface ACPpublic ACL getOrCreateACL()
getOrCreateACL in interface ACPpublic void setRules(String aclName, UserEntry[] userEntries)
ACPConsiders that all the passed entries are modifiable and attempts to set them as entries related to the current document.
public void setRules(String aclName, UserEntry[] userEntries, boolean overwrite)
ACPConsiders that all the passed entries are modifiable and attempts to set them as entries related to the current document.
public void setRules(UserEntry[] userEntries)
ACPConsiders that all the passed entries are modifiable and attempts to set them as local entries related to the current document.
public void setRules(UserEntry[] userEntries, boolean overwrite)
ACPConsiders 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.
public String[] listUsernamesForPermission(String perm)
ACPlistUsernamesForPermission in interface ACPperm - the permission name.public String[] listUsernamesForAnyPermission(Set<String> perms)
ACPlistUsernamesForAnyPermission in interface ACPperms - the list of permissions.Copyright © 2012 Nuxeo SA. All Rights Reserved.