@Relation(value="https://phenotips.org/rel/permissions") @ParentResource(value=org.phenotips.data.rest.PatientResource.class) public interface PermissionsResource
| Modifier and Type | Method and Description |
|---|---|
PermissionsRepresentation |
getPermissions(String entityId,
String entityType)
Retrieves all permissions: owner, collaborators, visibility.
|
javax.ws.rs.core.Response |
setPermissions(PermissionsRepresentation permissions,
String entityId,
String entityType)
Overwrites all permissions: owner, collaborators, visibility.
|
javax.ws.rs.core.Response |
updatePermissions(PermissionsRepresentation permissions,
String entityId,
String entityType)
Update permissions: owner, collaborators, visibility.
|
PermissionsRepresentation getPermissions(String entityId, String entityType)
entityId - internal identifier of an entity recordentityType - the type of entity (either "patients" or "families")javax.ws.rs.core.Response setPermissions(PermissionsRepresentation permissions, String entityId, String entityType)
"collaborators": {"collaborators": []} JSON fragment must be sent.permissions - must contain owner and visibility representations, and a list of collaborator representationsentityId - identifier of the entity whose permissions should be changedentityType - the type of entity (either "patients" or "families")@PATCH javax.ws.rs.core.Response updatePermissions(PermissionsRepresentation permissions, String entityId, String entityType)
DELETE request to the targeted CollaboratorResource, or PUT the full permissions without
the collaborators to be removed. If the indicated entity record doesn't exist, or if the user sending the
request doesn't have the right to edit the target entity record, no change is performed and an error is
returned.permissions - may contain owner and visibility representations, and a list of collaborator representationsentityId - identifier of the entity whose permissions should be changedentityType - the type of entity (either "patients" or "families")Copyright © 2011–2018 University of Toronto, Computational Biology Lab. All rights reserved.