Manage the Access Control List of shared folders
returns the AccessType for all the users in a shared folder
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | id of the shared folder |
| code | condition |
|---|---|
| 200 | Shared folder found. |
| 500 | This item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | ACLList (JSON) |
GET /items/{id}/acls
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"acls" : [ {
"principal" : "...",
"accessTypes" : [ "READ_ONLY", "WRITE_OWNER" ]
}, {
"principal" : "...",
"accessTypes" : [ "WRITE_ALL", "ADMINISTRATOR" ]
} ]
}
Set a new AccessType for a user in a shared folder or VRE folder
| name | type | description |
|---|---|---|
| access | form | access type Possible values: READ_ONLY, WRITE_OWNER, WRITE_ALL, ADMINISTRATOR |
| user | form | user id |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | id of the shared folder |
| media type | data type |
|---|---|
| multipart/form-data | (custom) |
| code | condition |
|---|---|
| 204 | Access type updated. |
| 400 | User does not exist. |
| 415 | Wrong content type. |
| 500 | This shared item does not exist or wrong access type. |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
PUT /items/{id}/acls
Content-Type: multipart/form-data
Accept: application/json
Authorization: ...
--------boundaryString
Content-Disposition: form-data; name="user"
user2
--------boundaryString
Content-Disposition: form-data; name="accessType"
WRITE_OWNER
--------boundaryString--
...
HTTP/1.1 204 No Content
Content-Type: application/json
...
Check if the current user can write on the shared folder
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | id of the shared folder |
| code | condition |
|---|---|
| 200 | Shared folder found. |
| 406 | This shared folder does not exist. |
| media type | data type | description |
|---|---|---|
| text/plain | object | true if the current user can write on the shared folder, false otherwise |
GET /items/{id}/acls/write
Content-Type: */*
Accept: text/plain
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: text/plain
true
Remove a user from the shared folder
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | id of the shared folder |
| user | path | user id |
| code | condition |
|---|---|
| 204 | User removed. |
| 415 | Wrong content type. |
| 500 | This shared item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) |
DELETE /items/{id}/acls/{user}
Content-Type: text/plain
Accept: application/json
Authorization: ...
...
HTTP/1.1 204 No Content
Content-Type: application/json
...