@AlfrescoPublicApi
public interface PermissionService
Modifier and Type | Method and Description |
---|---|
void |
clearPermission(NodeRef nodeRef,
String authority)
Delete all permission for the given authority.
|
void |
clearPermission(StoreRef storeRef,
String authority)
Clear all permission masks for an authority on a store
|
void |
deletePermission(NodeRef nodeRef,
String authority,
String permission)
Find and delete a access control entry by node, authentication and permission.
|
void |
deletePermission(StoreRef storeRef,
String authority,
String permission)
Remove part of a permission mask on a store
|
void |
deletePermissions(NodeRef nodeRef)
Delete all the permission assigned to the node
|
void |
deletePermissions(StoreRef storeRef)
Remove all permission mask on a store
|
String |
getAllAuthorities()
Get the All Authorities
|
String |
getAllPermission()
Get the All Permission
|
Set<AccessPermission> |
getAllSetPermissions(NodeRef nodeRef)
Get all the AccessPermissions that are set for anyone for the given node
|
Set<AccessPermission> |
getAllSetPermissions(StoreRef storeRef)
Get all the AccessPermissions that are set for anyone for the given node
|
Set<String> |
getAuthorisations()
Get the set of authorities for currently authenticated user
|
boolean |
getInheritParentPermissions(NodeRef nodeRef)
Return the global inheritance behaviour for permissions on a node.
|
String |
getOwnerAuthority()
Get the Owner Authority
|
Set<AccessPermission> |
getPermissions(NodeRef nodeRef)
Get all the AccessPermissions that are granted/denied to the current authentication for the given node
|
Set<String> |
getReaders(Long aclId)
Get the readers associated with a given ACL
|
Set<String> |
getReadersDenied(Long aclId)
Get the denied authorities associated with a given ACL
|
Set<String> |
getSettablePermissions(NodeRef nodeRef)
Get the permissions that can be set for a given node
|
Set<String> |
getSettablePermissions(QName type)
Get the permissions that can be set for a given type
|
AccessStatus |
hasPermission(Long aclID,
PermissionContext context,
String permission)
Check if a permission is allowed on an acl.
|
AccessStatus |
hasPermission(NodeRef nodeRef,
String permission)
Check that the given authentication has a particular permission for the given node.
|
AccessStatus |
hasReadPermission(NodeRef nodeRef)
Check if read permission is allowed on an acl (optimised)
caveats:
doesn't take into account dynamic authorities/groups
doesn't take into account node types/aspects for permissions
|
void |
setInheritParentPermissions(NodeRef nodeRef,
boolean inheritParentPermissions)
Set the global inheritance behaviour for permissions on a node.
|
void |
setInheritParentPermissions(NodeRef nodeRef,
boolean inheritParentPermissions,
boolean asyncCall)
Set the global inheritance behavior for permissions on a node.
|
void |
setPermission(NodeRef nodeRef,
String authority,
String permission,
boolean allow)
Set a specific permission on a node.
|
void |
setPermission(StoreRef storeRef,
String authority,
String permission,
boolean allow)
Add a permission mask to a store
|
static final String ROLE_PREFIX
static final String GROUP_PREFIX
static final String ALL_AUTHORITIES
static final String OWNER_AUTHORITY
static final String LOCK_OWNER_AUTHORITY
static final String ADMINISTRATOR_AUTHORITY
static final String GUEST_AUTHORITY
static final String ALL_PERMISSIONS
static final String FULL_CONTROL
static final String READ
static final String WRITE
static final String DELETE
static final String ADD_CHILDREN
static final String READ_PROPERTIES
static final String READ_CHILDREN
static final String WRITE_PROPERTIES
static final String DELETE_NODE
static final String DELETE_CHILDREN
static final String CREATE_CHILDREN
static final String LINK_CHILDREN
static final String DELETE_ASSOCIATIONS
static final String READ_ASSOCIATIONS
static final String CREATE_ASSOCIATIONS
static final String READ_PERMISSIONS
static final String CHANGE_PERMISSIONS
static final String EXECUTE
static final String READ_CONTENT
static final String WRITE_CONTENT
static final String EXECUTE_CONTENT
static final String TAKE_OWNERSHIP
static final String SET_OWNER
static final String COORDINATOR
static final String CONTRIBUTOR
static final String EDITOR
static final String CONSUMER
static final String LOCK
static final String UNLOCK
static final String CHECK_OUT
static final String CHECK_IN
static final String CANCEL_CHECK_OUT
static final String ASPECTS
static final String PROPERTIES
@Auditable String getOwnerAuthority()
@Auditable String getAllAuthorities()
@Auditable String getAllPermission()
@Auditable(parameters="nodeRef") Set<AccessPermission> getPermissions(NodeRef nodeRef)
nodeRef
- -
the reference to the node@Auditable(parameters="nodeRef") Set<AccessPermission> getAllSetPermissions(NodeRef nodeRef)
nodeRef
- -
the reference to the node@Auditable(parameters="nodeRef") Set<String> getSettablePermissions(NodeRef nodeRef)
@Auditable(parameters="type") Set<String> getSettablePermissions(QName type)
@Auditable(parameters={"nodeRef","permission"}) AccessStatus hasPermission(NodeRef nodeRef, String permission)
@Auditable(parameters="nodeRef") AccessStatus hasReadPermission(NodeRef nodeRef)
nodeRef
- -
the reference to the node@Auditable(parameters="aclId") Set<String> getReaders(Long aclId)
aclId
- the low-level ACL ID@Auditable(parameters="aclId") Set<String> getReadersDenied(Long aclId)
aclId
- the low-level ACL ID@Auditable(parameters={"aclID","context","permission"}) AccessStatus hasPermission(Long aclID, PermissionContext context, String permission)
@Auditable(parameters="nodeRef") void deletePermissions(NodeRef nodeRef)
@Auditable(parameters={"nodeRef","authority"}) void clearPermission(NodeRef nodeRef, String authority)
authority
- (if null then this will match all authorities)@Auditable(parameters={"nodeRef","authority","permission"}) void deletePermission(NodeRef nodeRef, String authority, String permission)
nodeRef
- the node that the entry applies toauthority
- the authority recipient (if null then this will match all authorities)permission
- the entry permission (if null then this will match all permissions)@Auditable(parameters={"nodeRef","authority","permission","allow"}) void setPermission(NodeRef nodeRef, String authority, String permission, boolean allow)
@Auditable(parameters={"nodeRef","inheritParentPermissions"}) void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions)
@Auditable(parameters={"nodeRef","inheritParentPermissions","asyncCall"}) void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions, boolean asyncCall)
nodeRef
- node for which inheritance will be set.inheritParentPermissions
- true to inherit parent permissions, false otherwise.asyncCall
- true if fixed ACLs should be asynchronously set when operation execution takes too long,
false to execute synchronously regardless of execution time.@Auditable(parameters="nodeRef") boolean getInheritParentPermissions(NodeRef nodeRef)
@Auditable(parameters={"storeRef","authority","permission","allow"}) void setPermission(StoreRef storeRef, String authority, String permission, boolean allow)
@Auditable(parameters={"storeRef","authority","permission"}) void deletePermission(StoreRef storeRef, String authority, String permission)
@Auditable(parameters={"storeRef","authority"}) void clearPermission(StoreRef storeRef, String authority)
@Auditable(parameters="storeRef") void deletePermissions(StoreRef storeRef)
@Auditable(parameters="storeRef") Set<AccessPermission> getAllSetPermissions(StoreRef storeRef)
storeRef
- -
the reference to the storeCopyright © 2005–2018 Alfresco Software. All rights reserved.