plta-permissions-api-cbz

Check if the user has the right to perform the action on the resource

This operation receives a specific action and a list of resources, and returns a subset of resources on which the user can perform this action. The user is identified by its token.

post
https://dev.api.sanofi.com/permissions/permissions/checks

Body

application/json
actionNamestringrequired

The action that can be performed on the resource

Example:read

resourceNamestringrequired

Unique identifier of the resource

Example:document_123

Response

application/json

Return the list of resources on which the user can execute the action

the combination of a specific action with a specific resource for a given user. It is denormalized from an AccessRight to include all action and resource hierarchy.

actionNamestringrequired

Name of the action.

Example:read_narrative, write_compound

resourceNamestringrequired

Name of the resource.

Example:compound_1245

userIdstring

The id of the user, as stored in IDP. For Sanofi internal user, it would be the oid (Unique identifier of the user in Azure AD)

hasAccessbooleanrequiredread-only

indicate whether the user can use the action on the resource

post/permissions/checks

Body

[ { "actionName": "read", "resourceName": "document123" }, { "actionName": "write", "resourceName": "document789" } ]
 
application/json