code | type | title | description |
---|---|---|---|
true |
page |
checkRights |
Checks if an API action can be executed by the current user |
Checks if the provided API request can be executed by the current logged user.
checkRights(requestPayload)
Property | Type | Description |
---|---|---|
requestPayload |
object |
Contains a RequestPayload |
timeout |
number |
Time (in ms) during which a request will still be waited to be resolved. Set it -1 if you want to wait indefinitely |
The RequestPayload must contains at least the following properties:
controller
: API controlleraction
: API action
A boolean telling whether the provided request would have been allowed or not.
<<< ./snippets/check-rights.js