Add Folder ACL
Overview
This operation adds READ or WRITE permissions to repository folders for the specified users or roles. A user or role who is granted WRITE permission will always have READ permission also.
All users or roles are given permission on the specified folders. It is not possible to specify different permissions for each user or role in a single request.
Note: When viewed in the Spectrum Management Console, READ permissions are added as
both EXECUTE and VIEW permissions to the NamedResource entity override, while
WRITE permissions are added as EXECUTE, VIEW, CREATE, MODIFY, and DELETE to the
NamedResource entity override.
ACL Authorization Flow
The user making this request will only be able to add permissions on resources within the folders (or subfolders) on which they have WRITE permission.
HTTP PUT URL Format
The following format is used for HTTP PUT requests to add folder ACL:
HTTP PUT URL: /acl/folders PUT DATA: { "users":[ "user1" ], "roles":[ "role1" ], "resources":[ "/Samples/NamedTables" ], "permissions":[ "READ", "WRITE" ] } PUT HEADER: Content-Type:application/json
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
users | String | Yes | Specifies a list of users. Required only when roles are not given in the request. |
roles | String | Yes | Specifies a list of roles. Required only when users are not given in the request. |
resources | String | Yes | Specifies a list of repository folders. |
permissions | String | Yes | Specifies the permission the repository folder needs to be given. The permission can be one or more of READ or WRITE. |
Returns
Adds READ or WRITE permissions to the folders for the specified users or roles.
Example for PUT
Request URL
http://<server>:<port>/rest/Spatial/AccessControlService/acl/folders
Request Body
{ "users":[ "user1" ], "roles":[ "role1" ], "resources":[ "/Samples/NamedTables" ], "permissions":[ "READ", "WRITE" ] }
Response
{ "users":[ "user1" ], "roles":[ "role1" ], "resources":[ "/Samples/NamedTables/" ] }