Package fr.becpg.repo.security
Interface SecurityService
- All Known Implementing Classes:
SecurityServiceImpl
public interface SecurityService
SecurityService interface.
- Version:
- $Id: $Id
- Author:
- "Matthieu Laborie"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAccess statusstatic final intConstantREAD_ACCESS=1static final intConstantWRITE_ACCESS=2 -
Method Summary
Modifier and TypeMethodDescriptionintcomputeAccessMode(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType, String name) Compute access mode for the given field name on a specific typeintcomputeAccessMode(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType, org.alfresco.service.namespace.QName name) Compute access mode for the given field name on a specific typeExtract props list based on existing ACL_GROUPSgetFieldsWithRules(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType) The fields of a type a security rule is set on, among the rules that apply to the given node (its local rules, or the global ones).getPermissionContext(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType, String propName) Get the permission context for a given node and a given propertyList available security roles for userbooleanisCurrentUserAllowed(String securityGroup) Check user is in currentSecurityGroup or isAdminvoidRefresh ACLS cache per tenant
-
Field Details
-
NONE_ACCESS
static final int NONE_ACCESSAccess status- See Also:
-
READ_ACCESS
static final int READ_ACCESSConstantREAD_ACCESS=1- See Also:
-
WRITE_ACCESS
static final int WRITE_ACCESSConstantWRITE_ACCESS=2- See Also:
-
-
Method Details
-
computeAccessMode
int computeAccessMode(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType, String name) Compute access mode for the given field name on a specific type- Parameters:
nodeRef- aNodeRefobjectnodeType- aQNameobject.name- aStringobject.- Returns:
- Access Mode status
-
computeAccessMode
int computeAccessMode(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType, org.alfresco.service.namespace.QName name) Compute access mode for the given field name on a specific type- Parameters:
nodeRef- aNodeRefobjectnodeType- aQNameobject.name- aQNameobject.- Returns:
- Access Mode status
-
getFieldsWithRules
Set<String> getFieldsWithRules(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType) The fields of a type a security rule is set on, among the rules that apply to the given node (its local rules, or the global ones).A field outside this set is readable whoever asks, which lets a caller reading many fields evaluate
computeAccessMode(NodeRef, QName, String)for the ruled ones only.- Parameters:
nodeRef- the node whose rules apply, or null for the global rulesnodeType- the type the rules are set on- Returns:
- the names the rules of the type are set on (prefixed fields and lists, or entries such
as
View-documents), empty when the type has no rule
-
refreshAcls
void refreshAcls()Refresh ACLS cache per tenant -
getAvailablePropNames
Extract props list based on existing ACL_GROUPS- Returns:
- a
Listobject.
-
isCurrentUserAllowed
Check user is in currentSecurityGroup or isAdmin- Parameters:
securityGroup- aStringobject.- Returns:
- a boolean.
-
getUserSecurityRoles
List available security roles for user- Returns:
- a
Listobject.
-
getPermissionContext
PermissionContext getPermissionContext(org.alfresco.service.cmr.repository.NodeRef nodeRef, org.alfresco.service.namespace.QName nodeType, String propName) Get the permission context for a given node and a given property
-