public class PermissionsResource extends AbstractResource
Modifier and Type | Field and Description |
---|---|
static String |
ENDPOINT |
ACCESSOR_PARAM, ALL_PARAM, AUTH_HEADER_NAME, COMMIT_PARAM, CSV_MEDIA_TYPE, DEFAULT_LIST_LIMIT, FILTER_PARAM, graph, GROUP_PARAM, ID_PARAM, INCLUDE_PROPS_PARAM, ITEM_CACHE_TIME, jsonFactory, jsonMapper, LIMIT_PARAM, LOG_MESSAGE_HEADER_NAME, LOG_PARAM, logger, manager, N3_MIMETYPE, OFFSET_PARAM, PATCH_HEADER_NAME, RANGE_HEADER_NAME, RDF_MIMETYPE_FORMATS, RDF_XML_MIMETYPE, request, requestHeaders, RESOURCE_ENDPOINT_PREFIX, SCOPE_PARAM, SORT_PARAM, STREAM_HEADER_NAME, TOLERANT_PARAM, TURTLE_MIMETYPE, uriInfo, VERSION_PARAM
Constructor and Description |
---|
PermissionsResource(org.neo4j.graphdb.GraphDatabaseService database) |
Modifier and Type | Method and Description |
---|---|
static javax.ws.rs.core.CacheControl |
getCacheControl()
Get the cache control that should be applied to permission
data.
|
InheritedItemPermissionSet |
getEntityMatrix(String userId,
String id)
Get the permission matrix for a given user on the given entity.
|
InheritedGlobalPermissionSet |
getGlobalMatrix()
Get the global permission matrix for the user making the request, based
on the Authorization header.
|
InheritedGlobalPermissionSet |
getGlobalMatrix(String userId)
Get the global permission matrix for the given accessor.
|
InheritedGlobalPermissionSet |
getScopedMatrix(String userId,
String id)
Get the user's permissions for a given scope.
|
javax.ws.rs.core.Response |
listPermissionGrants(String id)
Get a list of permission grants for the given user
|
InheritedGlobalPermissionSet |
setGlobalMatrix(String userId,
GlobalPermissionSet globals)
Set a user's global permission matrix.
|
InheritedItemPermissionSet |
setItemPermissions(String userId,
String id,
ItemPermissionSet itemPerms)
Set a user's permissions on a given item.
|
InheritedGlobalPermissionSet |
setScopedPermissions(String userId,
String id,
GlobalPermissionSet globals)
Set a user's permissions on a content type with a given scope.
|
anonymousApi, api, beginTx, creationResponse, getCacheControl, getCurrentActioner, getCurrentUser, getGraph, getIntQueryParam, getItemUri, getLogMessage, getQuery, getRdfFormat, getRequesterUserProfile, getSerializer, getStringListQueryParam, isPatch, isStreaming, single, streamingList, streamingList, streamingListOfLists, streamingPage, streamingPage, streamingVertexList, streamingVertexList
public static final String ENDPOINT
public PermissionsResource(@Context org.neo4j.graphdb.GraphDatabaseService database)
public static javax.ws.rs.core.CacheControl getCacheControl()
public InheritedGlobalPermissionSet getGlobalMatrix() throws PermissionDenied, ItemNotFound
PermissionDenied
ItemNotFound
public InheritedGlobalPermissionSet getGlobalMatrix(String userId) throws PermissionDenied, ItemNotFound
userId
- The user IDPermissionDenied
ItemNotFound
public InheritedGlobalPermissionSet setGlobalMatrix(String userId, GlobalPermissionSet globals) throws PermissionDenied, ItemNotFound
userId
- The user IDglobals
- The permission matrix dataPermissionDenied
ItemNotFound
public InheritedItemPermissionSet getEntityMatrix(String userId, String id) throws PermissionDenied, ItemNotFound
userId
- The user's IDid
- The item idPermissionDenied
ItemNotFound
public InheritedItemPermissionSet setItemPermissions(String userId, String id, ItemPermissionSet itemPerms) throws PermissionDenied, ItemNotFound
id
- the item iduserId
- the user iditemPerms
- the serialized permission listPermissionDenied
ItemNotFound
public InheritedGlobalPermissionSet getScopedMatrix(String userId, String id) throws PermissionDenied, ItemNotFound
userId
- The user's permissionsid
- The scope IDPermissionDenied
ItemNotFound
public InheritedGlobalPermissionSet setScopedPermissions(String userId, String id, GlobalPermissionSet globals) throws PermissionDenied, ItemNotFound
userId
- the userid
- the scope idglobals
- the serialized permission listPermissionDenied
ItemNotFound
public javax.ws.rs.core.Response listPermissionGrants(String id) throws ItemNotFound
id
- the user's idItemNotFound
Copyright © 2018 The European Holocaust Research Infrastructure (EHRI). All rights reserved.