public class SecurityData extends Object implements Serializable
current doc grants:
user 1 - perm1, perm2
user 2 - perm1, perm2
user 3 - perm2
current doc denies:
...
parent doc grants:
...
parent doc denies:
...
Also has methods that allow manipulation of the contained data, such as add/remove security privileges. The end result after add/remove has been called will be converted to a backend security DTO and then submitted on backend.
Constructor and Description |
---|
SecurityData() |
Modifier and Type | Method and Description |
---|---|
void |
addModifiablePrivilege(String principalName,
String permissionName,
boolean grant)
Adds a privilege to the displayed list.
|
void |
addUnModifiablePrivilege(String principalName,
String permissionName,
boolean grant)
Adds an unmodifiable privilege to the displayed list (these are related
to the parent documents).
|
void |
clear() |
Map<String,List<String>> |
getCurrentDocDeny() |
Map<String,List<String>> |
getCurrentDocGrant() |
List<String> |
getCurrentDocumentUsers() |
String |
getDocumentType() |
boolean |
getNeedSave() |
Map<String,List<String>> |
getParentDocsDeny() |
Map<String,List<String>> |
getParentDocsDenyLabels() |
Map<String,List<String>> |
getParentDocsGrant() |
Map<String,List<String>> |
getParentDocsGrantLabels() |
List<String> |
getParentDocumentsUsers() |
void |
rebuildUserLists() |
void |
removeModifiablePrivilege(String principalName)
Removes all privileges for a given user.
|
boolean |
removeModifiablePrivilege(String principalName,
String permissionName,
boolean grant)
Removes a privilege from the displayed list.
|
void |
setCurrentDocDeny(Map<String,List<String>> deny) |
void |
setCurrentDocGrant(Map<String,List<String>> grant) |
void |
setDocumentType(String documentType) |
void |
setNeedSave(boolean needSave) |
void |
setParentDocsDeny(Map<String,List<String>> parentDocsDeny) |
void |
setParentDocsGrant(Map<String,List<String>> parentDocsGrant) |
public void setNeedSave(boolean needSave)
public boolean getNeedSave()
public void rebuildUserLists()
public void addModifiablePrivilege(String principalName, String permissionName, boolean grant)
public boolean removeModifiablePrivilege(String principalName, String permissionName, boolean grant)
public void removeModifiablePrivilege(String principalName)
public void addUnModifiablePrivilege(String principalName, String permissionName, boolean grant)
public void clear()
public String getDocumentType()
public void setDocumentType(String documentType)
Copyright © 2011 Nuxeo SA. All Rights Reserved.