public final class PermissionUtils extends Object
| Constructor and Description |
|---|
PermissionUtils(com.tinkerpop.frames.FramedGraph<?> graph) |
PermissionUtils(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope scope) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkContentPermission(Accessor accessor,
ContentTypes contentType,
PermissionType permissionType)
Check permissions for a given type.
|
void |
checkEntityPermission(Accessible entity,
Accessor accessor,
PermissionType permissionType)
Check permissions for a given entity.
|
void |
checkReadAccess(Accessible entity,
Accessor accessor)
Ensure an item is readable by the given accessor
|
ContentTypes |
getContentTypeEnum(Class<?> cls)
Get the content type enum value with the given id.
|
ContentType |
getContentTypeNode(EntityClass entityClass)
Get the content type node with the given id.
|
PermissionUtils |
setScope(PermissionScope scope)
Set the scope under which ACL and permission operations will take place.
|
public PermissionUtils(com.tinkerpop.frames.FramedGraph<?> graph)
public PermissionUtils(com.tinkerpop.frames.FramedGraph<?> graph,
PermissionScope scope)
public void checkContentPermission(Accessor accessor, ContentTypes contentType, PermissionType permissionType) throws PermissionDenied
accessor - The user/groupcontentType - The content typepermissionType - The permission typePermissionDeniedpublic void checkEntityPermission(Accessible entity, Accessor accessor, PermissionType permissionType) throws PermissionDenied
entity - The itemaccessor - The user/grouppermissionType - The permission typePermissionDeniedpublic void checkReadAccess(Accessible entity, Accessor accessor) throws AccessDenied
entity - The itemaccessor - The accessor/groupAccessDeniedpublic ContentType getContentTypeNode(EntityClass entityClass)
entityClass - The entity classpublic ContentTypes getContentTypeEnum(Class<?> cls)
cls - The frame classpublic PermissionUtils setScope(PermissionScope scope)
scope - The new scopeCopyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.