plta-permissions-api-cbz

Add an admin grant to a role

Add an admin grant to a role. The caller needs manageRoles over the role’s scope, and must already hold an admin right covering the exact operation and restrictions being granted. The action and resource restrictions must be within the role’s declared scope. manageRoles and manageMigrations cannot be granted through a role.

post
https://dev.api.sanofi.com/permissions/roles/{roleName}/adminGrants

Path Parameters

roleNamestringrequired

The name of the role

Body

application/json

AdminGrant

An admin right (an operation, with optional action/resource restrictions) attached to a role. Every member of the role inherits it. The restrictions must be within the role’s declared scope. The caller must already hold an admin right covering the exact operation and restrictions being granted.

actionRestrictionstring

Name of the action that will restrict the action usable in this operation to a specific hierarchy, within the role’s scope.

Example:write_narrative, read_compound

operationNamestringrequired

Name of the operation.

Example:manageActions, manageResources, manageAccessRights

resourceRestrictionstring

Name of the resource that will restrict the resource usable in this operation to a specific hierarchy, within the role’s scope.

Example:compound_1245, study_1245

Response

application/json

Created

AdminGrant

An admin right (an operation, with optional action/resource restrictions) attached to a role. Every member of the role inherits it. The restrictions must be within the role’s declared scope. The caller must already hold an admin right covering the exact operation and restrictions being granted.

actionRestrictionstring

Name of the action that will restrict the action usable in this operation to a specific hierarchy, within the role’s scope.

Example:write_narrative, read_compound

adminGrantIdstring(uuid)read-only

The unique identifier of the admin grant, mostly for deletion purpose.

operationNamestringrequired

Name of the operation.

Example:manageActions, manageResources, manageAccessRights

resourceRestrictionstring

Name of the resource that will restrict the resource usable in this operation to a specific hierarchy, within the role’s scope.

Example:compound_1245, study_1245

roleNamestringread-only

The name of the role this grant is attached to, as given in the path.

post/roles/{roleName}/adminGrants

Body

{ "operationName": "manageActions" }
 
application/json