public final class AclManager extends Object
| Constructor and Description |
|---|
AclManager(com.tinkerpop.frames.FramedGraph<?> graph)
Constructor.
|
AclManager(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope scope)
Scoped constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
belongsToAdmin(Accessor accessor)
Check if an accessor is admin or a member of Admin.
|
boolean |
canAccess(Accessible entity,
Accessor accessor)
Determine if a user can access an entity.
|
static com.tinkerpop.pipes.PipeFunction<com.tinkerpop.blueprints.Vertex,Boolean> |
getAclFilterFunction(Accessor accessor)
Build a gremlin filter function that passes through items readable by a
given accessor.
|
com.tinkerpop.pipes.PipeFunction<com.tinkerpop.blueprints.Vertex,Boolean> |
getContentTypeFilterFunction()
Build a gremlin filter function that passes through items that are
bona fide content types.
|
GlobalPermissionSet |
getGlobalPermissions(Accessor accessor)
Recursive helper function to ascend an accessor's groups and populate
their global permissions.
|
InheritedGlobalPermissionSet |
getInheritedGlobalPermissions(Accessor accessor)
Return a permission list for the given accessor and her inherited groups.
|
InheritedItemPermissionSet |
getInheritedItemPermissions(Accessible entity,
Accessor accessor)
Get a list of permissions for a given accessor on a given entity, including
inherited permissions.
|
PermissionScope |
getScope()
Get scope.
|
PermissionGrant |
grantPermission(PermissionGrantTarget target,
PermissionType permType,
Accessor accessor)
Grant a user permissions to a content type.
|
boolean |
hasPermission(Accessible entity,
PermissionType permissionType,
Accessor accessor)
Check if a user has permission to perform an action on the given item.
|
boolean |
hasPermission(ContentTypes contentType,
PermissionType permissionType,
Accessor accessor)
Check if a user has permission to perform an action on the given content type.
|
static boolean |
isAnonymous(Accessor accessor)
Check if an accessor is admin or a member of Admin.
|
void |
removeAccessControl(Accessible entity,
Accessor accessor)
Revoke an accessor's access to an entity.
|
void |
revokePermission(Accessible entity,
PermissionType permType,
Accessor accessor)
Revoke a particular permission on the given entity.
|
void |
revokePermissionGrant(PermissionGrant grant)
Revoke a particular permission grant.
|
void |
setAccessors(Accessible entity,
Collection<Accessor> accessors)
Set access control on an entity to several accessors.
|
void |
setItemPermissions(Accessible item,
Accessor accessor,
Set<PermissionType> permissionSet)
Set the permissions for a particular user on the given item.
|
void |
setPermissionMatrix(Accessor accessor,
GlobalPermissionSet globals)
Set a matrix of global permissions for a given accessor.
|
AclManager |
withScope(PermissionScope scope)
Set scope.
|
public AclManager(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope scope)
graph - The framed graphscope - The ACL scopepublic AclManager(com.tinkerpop.frames.FramedGraph<?> graph)
graph - The framed graphpublic static boolean belongsToAdmin(Accessor accessor)
accessor - The user/grouppublic static boolean isAnonymous(Accessor accessor)
accessor - The user/grouppublic boolean canAccess(Accessible entity, Accessor accessor)
entity - The itemaccessor - The user/grouppublic void removeAccessControl(Accessible entity, Accessor accessor)
entity - The itemaccessor - A user/group from whom to revoke accesspublic void setAccessors(Accessible entity, Collection<Accessor> accessors)
entity - The itemaccessors - A set of users/groups who can access the itempublic InheritedItemPermissionSet getInheritedItemPermissions(Accessible entity, Accessor accessor)
accessor - The accessorpublic void setItemPermissions(Accessible item, Accessor accessor, Set<PermissionType> permissionSet) throws PermissionDenied
item - The itemaccessor - The user/grouppermissionSet - A set of permissionsPermissionDeniedpublic InheritedGlobalPermissionSet getInheritedGlobalPermissions(Accessor accessor)
accessor - The user/grouppublic GlobalPermissionSet getGlobalPermissions(Accessor accessor)
accessor - The user/grouppublic void setPermissionMatrix(Accessor accessor, GlobalPermissionSet globals) throws PermissionDenied
accessor - The user/groupglobals - global permission mapPermissionDeniedpublic PermissionGrant grantPermission(PermissionGrantTarget target, PermissionType permType, Accessor accessor)
target - The grant target (content type or item)permType - The permission typeaccessor - The user/grouppublic void revokePermission(Accessible entity, PermissionType permType, Accessor accessor)
entity - The itempermType - The permission typeaccessor - The user/grouppublic void revokePermissionGrant(PermissionGrant grant)
grant - The grant to revokepublic com.tinkerpop.pipes.PipeFunction<com.tinkerpop.blueprints.Vertex,Boolean> getContentTypeFilterFunction()
public static com.tinkerpop.pipes.PipeFunction<com.tinkerpop.blueprints.Vertex,Boolean> getAclFilterFunction(Accessor accessor)
accessor - The user/grouppublic boolean hasPermission(ContentTypes contentType, PermissionType permissionType, Accessor accessor)
contentType - The content typepermissionType - The requested permissionaccessor - The userpublic boolean hasPermission(Accessible entity, PermissionType permissionType, Accessor accessor)
entity - The itempermissionType - The requested permissionaccessor - The userpublic AclManager withScope(PermissionScope scope)
scope - The new permission scopepublic PermissionScope getScope()
Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.