public class DocumentSecurityService extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ADD_PERMISSIONS_OP
Add permissions operation identifier.
|
static String |
INHERITED_ACL
Inherited ACL identidier.
|
static String |
LOCAL_ACL
Local ACL identifier.
|
static String |
REMOVE_GROUP_PERMISSIONS_OP
Remove group (inherited / local) of permissions operation identifier.
|
static String |
REMOVE_PERMISSIONS_OP
Remove permissions operation identifier.
|
protected Session |
session
Client session.
|
| Constructor and Description |
|---|
DocumentSecurityService(Session session)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Document |
addPermissions(Document document,
DocumentPermissions permissions,
String acl,
boolean blockInheritance)
Adds permissions in given ACL
blocking or not inheritance.
|
Session |
getSession()
Getter for session.
|
Document |
removeGroupPermissions(DocRef docRef,
String acl)
Remove given ACL on document,
i.e. inherited or local ACL.
|
Document |
removePermissions(DocRef docRef,
DocumentPermissions permissions,
List<String> userNames,
String acl,
boolean removeAll,
boolean blockInheritance)
Removes ACEs in given ACL, blocking or not inheritance:
- if removeAll is true, removes all ACEs of given ACL
- if userNames is set, removes all ACEs of given users.
|
public static final String LOCAL_ACL
public static final String INHERITED_ACL
public static final String ADD_PERMISSIONS_OP
public static final String REMOVE_PERMISSIONS_OP
public static final String REMOVE_GROUP_PERMISSIONS_OP
protected Session session
public DocumentSecurityService(Session session)
public Session getSession()
public Document addPermissions(Document document, DocumentPermissions permissions, String acl, boolean blockInheritance) throws Exception
document - permissions - blockInheritance - Exceptionpublic Document removePermissions(DocRef docRef, DocumentPermissions permissions, List<String> userNames, String acl, boolean removeAll, boolean blockInheritance) throws Exception
docRef - permissions - userNames - acl - removeAll - blockInheritance - ExceptionCopyright © 2019. All rights reserved.