public interface Acl
Modifier and Type | Method and Description |
---|---|
void |
addEntry(String name,
AclLevel accessLevel,
List<String> roles,
Collection<AclFlag> accessFlags)
This function adds an entry to an access control list.
|
void |
addRole(String role)
Adds a role to the ACL.
|
String |
getAdminServer()
Reads the name of the administration server for the access control list.
|
List<AclEntry> |
getEntries()
Returns all ACL entries
|
Optional<AclEntry> |
getEntry(String name)
Convenience method that call
getEntries() and returns a single
value for the specified name |
List<String> |
getRoles()
Returns all roles declared in the ACL
|
boolean |
isUniformAccess()
Check if "Enforce consistent ACL" is set
|
AclAccess |
lookupAccess(String userName)
Looks up the access level for a user and his groups
|
AclAccess |
lookupAccess(UserNamesList namesList)
Looks up the access level for a
UserNamesList |
void |
removeEntry(String name)
This function deletes an entry from an access control list.
|
void |
removeRole(String role)
Removes a role from the ACL
|
void |
renameRole(String oldName,
String newName)
Changes the name of a role
|
void |
save()
This function persists the access control list in the parent database.
|
void |
setAdminServer(String server)
Change the name of the administration server for the access control list.
|
void |
setUniformAccess(boolean uniformAccess)
Changes the value for "Enforce consistent ACL"
|
void |
updateEntry(String name,
String newName,
AclLevel newAccessLevel,
List<String> newRoles,
Collection<AclFlag> newFlags)
This function updates an entry in an access control list.
Unless the user's name is specified to be modified, the information that is not specified to be modified remains intact. If the user's name is specified to be modified, the user entry is deleted and a new entry is created. Unless the other access control information is specified to be modified as well, the other access control information will be cleared and the user will have No Access to the database. |
AclAccess lookupAccess(String userName)
userName
- username, either canonical or abbreviatedAclAccess lookupAccess(UserNamesList namesList)
UserNamesList
namesList
- names list for a userList<AclEntry> getEntries()
Optional<AclEntry> getEntry(String name)
getEntries()
and returns a single
value for the specified namename
- nameOptional
describing the ACL entry, or an empty one if not foundvoid addEntry(String name, AclLevel accessLevel, List<String> roles, Collection<AclFlag> accessFlags)
name
- user or group to be added, either in abbreviated or canonical formataccessLevel
- Access level (AclLevel
), of the entry to be addedroles
- roles to be set for this useraccessFlags
- Access level modifier flags (AclFlag
), e.g.: unable to delete documents, unable to create documents, of the entry to be addedvoid removeEntry(String name)
name
- user or group to be deleted, in abbreviated or canonical formatvoid updateEntry(String name, String newName, AclLevel newAccessLevel, List<String> newRoles, Collection<AclFlag> newFlags)
name
- name of the entry to changenewName
- optional new entry name or nullnewAccessLevel
- optional new entry access level or nullnewRoles
- optional new entry roles or nullnewFlags
- optional new acl flags or nullvoid addRole(String role)
role
- role to addvoid removeRole(String role)
role
- role to removevoid renameRole(String oldName, String newName)
oldName
- old role name, either enclosed with [] or notnewName
- new role name, either enclosed with [] or notDominoException
- if role could not be foundvoid setAdminServer(String server)
server
- server, either in abbreviated or canonical formatString getAdminServer()
boolean isUniformAccess()
void setUniformAccess(boolean uniformAccess)
uniformAccess
- true to set "Enforce consistent ACL" flagvoid save()
Copyright © 2019–2021 HCL. All rights reserved.