@Name(value="securityActions") @Scope(value=CONVERSATION) public class SecurityActionsBean extends InputController implements SecurityActions, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
CACHED_PERMISSION_TO_CHECK |
protected List<String> |
cachedDeletedUserAndGroups |
protected List<String> |
cachedValidatedUserAndGroups |
protected NuxeoPrincipal |
currentUser |
protected CoreSession |
documentManager |
protected PageSelections<String> |
entries |
protected NavigationContext |
navigationContext |
protected boolean |
obsoleteSecurityData |
protected PermissionActionListManager |
permissionActionListManager |
protected PermissionListManager |
permissionListManager |
protected PrincipalListManager |
principalListManager |
protected SecurityData |
securityData |
protected static String[] |
SEED_PERMISSIONS_TO_CHECK |
protected List<String> |
selectedEntries |
protected String |
selectedEntry |
protected UserManager |
userManager |
actionManager, currentDocument, eventManager, facesMessages, resourcesAccessor, typeManager, typesTool| Constructor and Description |
|---|
SecurityActionsBean() |
| Modifier and Type | Method and Description |
|---|---|
String |
addPermission()
Adds a permission to the list of permissions for the current document.
|
String |
addPermission(String principalName,
String permissionName,
boolean grant) |
String |
addPermissionAndUpdate()
Adds a permission to the list of permissions for the current document and automatically update the backend with
updateSecurityOnDocument()>. |
String |
addPermissions()
Adds a list of permission to the list of permissions for the current document.
|
String |
addPermissionsAndUpdate()
Adds a list of permissions to the list of permissions for the current document and automatically update the
backend with
updateSecurityOnDocument()>. |
protected List<javax.faces.model.SelectItem> |
asSelectItems(String... permissions) |
String |
blockRightInheritance() |
Boolean |
displayInheritedPermissions() |
Boolean |
getBlockRightInheritance() |
boolean |
getCanAddSecurityRules()
Returns true if the implementator if the principal has the permission to add new security rules on currentItem.
|
boolean |
getCanRemoveSecurityRules()
Returns true if the implementator can provide a list of permissions delete now and the principal has
WriteSecurity permission on the currentItem.
|
List<String> |
getCurrentDocumentUsers() |
PageSelections<String> |
getDataTableModel() |
boolean |
getDisplayInheritedPermissions()
Returns true if inherited permissions have to be displayed (depending on rights blocking)
|
Map<String,String> |
getIconAltMap()
Maps the principal type to the icon alt text.
|
Map<String,String> |
getIconPathMap()
Maps the principal type to the icon path.
|
String |
getLabel(String permission) |
List<String> |
getParentDocumentsUsers() |
protected String[] |
getPermissionsToCheck() |
Map<String,String> |
getPermissionsToLabels()
Returns a Map containing all contributed permissions and their associated labels.
|
SecurityData |
getSecurityData() |
List<String> |
getSelectedEntries()
Returns selected entries used in add/remove methods
|
String |
getSelectedEntry()
Returns selected entry used in add/remove methods
|
List<javax.faces.model.SelectItem> |
getSettablePermissions() |
List<javax.faces.model.SelectItem> |
getUserVisiblePermissionSelectItems(String documentType) |
List<UserVisiblePermission> |
getVisibleUserPermissions(String documentType) |
boolean |
isMSIEorEdge() |
void |
rebuildSecurityData()
Rebuilds the security displayable data from the current selected document.
|
protected void |
reconstructTableModel()
Update the dataTableModel from the current
SecurityData this method is automatically called by
rebuildSecurityData method |
String |
removePermission()
Removes a permission from the list of permissions for the current document.
|
String |
removePermissionAndUpdate()
Removes a permission from the list of permissions for the current document and automatically update the backend
with
updateSecurityOnDocument()>. |
String |
removePermissions() |
String |
removePermissionsAndUpdate() |
void |
resetSecurityData()
Marks the current security data info as obsolete so that it gets lazily recomputed from the backend the next time
it is accessed.
|
String |
saveSecurityUpdates() |
void |
setBlockRightInheritance(Boolean blockRightInheritance) |
void |
setSelectedEntries(List<String> selectedEntries)
Sets selected entries used in add/remove methods
|
void |
setSelectedEntry(String selectedEntry)
Sets selected entry used in add/remove methods
|
String |
updateSecurityOnDocument()
Submits the security changes to the backend.
|
computeOutcome, extractReferences, getAdministrator, logDocumentWithName, logDocumentWithTitle, removeDocumentFromList, setFacesMessage@In(create=true) protected transient NavigationContext navigationContext
@In(create=true,
required=false)
protected transient CoreSession documentManager
@In(create=true) protected PermissionActionListManager permissionActionListManager
@In(create=true) protected PermissionListManager permissionListManager
@In(create=true) protected PrincipalListManager principalListManager
@In(create=true) protected transient UserManager userManager
@In(create=true) protected NuxeoPrincipal currentUser
protected static final String[] SEED_PERMISSIONS_TO_CHECK
protected String[] CACHED_PERMISSION_TO_CHECK
protected SecurityData securityData
protected boolean obsoleteSecurityData
protected PageSelections<String> entries
protected transient List<String> cachedValidatedUserAndGroups
protected transient List<String> cachedDeletedUserAndGroups
protected String selectedEntry
protected List<String> selectedEntries
public SecurityActionsBean()
@Observer(value="userAllDocumentTypesSelectionChanged",
create=false)
@BypassInterceptors
public void resetSecurityData()
SecurityActionsresetSecurityData in interface SecurityActionspublic void rebuildSecurityData()
SecurityActionsrebuildSecurityData in interface SecurityActionsprotected void reconstructTableModel()
SecurityData this method is automatically called by
rebuildSecurityData methodpublic PageSelections<String> getDataTableModel()
getDataTableModel in interface SecurityActionspublic SecurityData getSecurityData()
getSecurityData in interface SecurityActionspublic String updateSecurityOnDocument()
SecurityActionsupdateSecurityOnDocument in interface SecurityActionspublic String addPermission(String principalName, String permissionName, boolean grant)
addPermission in interface SecurityActionspublic String addPermission()
SecurityActionsupdateSecurityOnDocument()>.addPermission in interface SecurityActionspublic String addPermissions()
SecurityActionsupdateSecurityOnDocument()>
.addPermissions in interface SecurityActionspublic String addPermissionAndUpdate()
SecurityActionsupdateSecurityOnDocument()>.addPermissionAndUpdate in interface SecurityActionspublic String addPermissionsAndUpdate()
SecurityActionsupdateSecurityOnDocument()>.addPermissionsAndUpdate in interface SecurityActionspublic String saveSecurityUpdates()
saveSecurityUpdates in interface SecurityActionspublic String removePermission()
SecurityActionsupdateSecurityOnDocument()>
.removePermission in interface SecurityActionspublic String removePermissionAndUpdate()
SecurityActionsupdateSecurityOnDocument()>.removePermissionAndUpdate in interface SecurityActionspublic String removePermissions()
removePermissions in interface SecurityActionspublic String removePermissionsAndUpdate()
removePermissionsAndUpdate in interface SecurityActionspublic boolean getCanAddSecurityRules()
SecurityActionsgetCanAddSecurityRules in interface SecurityActionspublic boolean getCanRemoveSecurityRules()
SecurityActionsgetCanRemoveSecurityRules in interface SecurityActionspublic List<UserVisiblePermission> getVisibleUserPermissions(String documentType)
public List<javax.faces.model.SelectItem> getSettablePermissions()
getSettablePermissions in interface SecurityActionsprotected List<javax.faces.model.SelectItem> asSelectItems(String... permissions)
public List<javax.faces.model.SelectItem> getUserVisiblePermissionSelectItems(String documentType)
public Map<String,String> getIconAltMap()
SecurityActionsgetIconAltMap in interface SecurityActionspublic Map<String,String> getIconPathMap()
SecurityActionsgetIconPathMap in interface SecurityActionspublic Boolean getBlockRightInheritance()
getBlockRightInheritance in interface SecurityActionspublic void setBlockRightInheritance(Boolean blockRightInheritance)
setBlockRightInheritance in interface SecurityActionspublic String blockRightInheritance()
public Boolean displayInheritedPermissions()
displayInheritedPermissions in interface SecurityActionspublic boolean getDisplayInheritedPermissions()
SecurityActionsgetDisplayInheritedPermissions in interface SecurityActionspublic List<String> getCurrentDocumentUsers()
getCurrentDocumentUsers in interface SecurityActionspublic List<String> getParentDocumentsUsers()
getParentDocumentsUsers in interface SecurityActionsprotected String[] getPermissionsToCheck()
public String getSelectedEntry()
SecurityActionsgetSelectedEntry in interface SecurityActionspublic void setSelectedEntry(String selectedEntry)
SecurityActionssetSelectedEntry in interface SecurityActionspublic List<String> getSelectedEntries()
SecurityActionsgetSelectedEntries in interface SecurityActionspublic void setSelectedEntries(List<String> selectedEntries)
SecurityActionssetSelectedEntries in interface SecurityActions@Factory(value="isMSIEorEdge",
scope=SESSION)
public boolean isMSIEorEdge()
public Map<String,String> getPermissionsToLabels()
Copyright © 2016 Nuxeo SA. All rights reserved.