public interface ACL extends List<ACE>, Serializable, Cloneable
An ACP may contain several ACL identified by a name. This is to let external modules add security rules. There are 2 default ACLs:
local
ACL - this is the default type of ACL that may be defined by an user locally to a document
(using a security UI). inherited
- this is a special ACL generated by merging all document parents ACL. This ACL is
read only (cannot be modified locally on the document since it is inherited.
Modifier and Type | Field and Description |
---|---|
static String |
INHERITED_ACL |
static String |
LOCAL_ACL |
Modifier and Type | Method and Description |
---|---|
boolean |
add(ACE ace)
Add an ACE.
|
boolean |
blockInheritance(String username)
Block the inheritance.
|
Object |
clone()
Returns a recursive copy of the ACL sharing no mutable substructure with the original.
|
ACE[] |
getACEs()
Returns the ACEs defined by this list as an array.
|
String |
getName()
Gets the ACL name.
|
boolean |
removeByUsername(String username)
Remove all ACEs for
username . |
boolean |
replace(ACE oldACE,
ACE newACE)
Replace the
oldACE with newACE , only if the oldACE exists. |
void |
setACEs(ACE[] aces)
Sets the ACEs defined by this ACL.
|
boolean |
unblockInheritance()
Unblock the inheritance.
|
add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
static final String LOCAL_ACL
static final String INHERITED_ACL
void setACEs(ACE[] aces)
aces
- the ACE arrayboolean blockInheritance(String username)
username
- the user blocking the inheritanceboolean unblockInheritance()
boolean replace(ACE oldACE, ACE newACE)
oldACE
with newACE
, only if the oldACE
exists.
The newACE
keeps the same index as oldACE
.
boolean removeByUsername(String username)
username
.Copyright © 2018 Nuxeo. All rights reserved.