|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ACP
Access control policy (ACP) control the permissions access on a resource.
An ACP may contains several ACLs (access control list) identified by names.
The list of ACLs is ordered so that when checking permissions the ACL are consulted in an ascending order. (The ACL on position 0 is consulted first).
Every ACP has at least one ACL having the reserved name "local". This is the only user editable list (through the security UI).
Other ACLs are used internally and are editable only through the API.
Also an ACP may have a list named "inherited" that represents the ACLs inherited from the resource parents if any. These ACLs are merged in a single list that is always read only even through the API.
Method Summary | |
---|---|
void |
addACL(ACL 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 |
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)
Deprecated. Use the method from UserManager service getUsersForPermission instead |
String[] |
listUsernamesForPermission(String perm)
Deprecated. Use the method from UserManager service getUsersForPermission instead |
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. |
Method Detail |
---|
Access getAccess(String principal, String permission)
This is checking only the ACLs on that ACP. Parents if any are not checked.
principal
- the principal to checkpermission
- the permission to check
Access getAccess(String[] principals, String[] permissions)
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.
principals
- permissions
-
void setRules(UserEntry[] userEntries)
Considers that all the passed entries are modifiable and attempts to set them as local entries related to the current document.
userEntries
- void setRules(UserEntry[] userEntries, boolean overwrite)
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.
userEntries
- overwrite
- if true, will overwrite the whole current ACLvoid setRules(String aclName, UserEntry[] userEntries)
Considers that all the passed entries are modifiable and attempts to set them as entries related to the current document.
aclName
- userEntries
- void setRules(String aclName, UserEntry[] userEntries, boolean overwrite)
Considers that all the passed entries are modifiable and attempts to set them as entries related to the current document.
aclName
- userEntries
- overwrite
- if true, will overwrite the whole ACLString[] getOwners()
void setOwners(String[] owners)
void removeOwner(String owner)
void addOwner(String owner)
boolean isOwner(String username)
void addACL(ACL acl)
void addACL(int pos, ACL acl)
void addACL(String afterMe, ACL acl)
ACL removeACL(String name)
ACL getACL(String name)
ACL[] getACLs()
ACL getMergedACLs(String name)
ACL getOrCreateACL(String name)
ACL getOrCreateACL()
@Deprecated String[] listUsernamesForPermission(String perm)
perm
- the permission name.
@Deprecated String[] listUsernamesForAnyPermission(Set<String> perms)
perms
- the list of permissions.
Object clone()
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |