getMyRights #
Returns the exhaustive list of granted or denied rights for the currently logged in user.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/users/_me/_rights
Method: GET
Headers: Authorization: "Bearer <authentication token>"
Other protocols #
{
"controller": "auth",
"action": "getMyRights",
"jwt": "<authentication token>"
}
Arguments #
jwt
: valid authentication token (for the HTTP protocol, the token is to be passed to theAuthorization
header instead)
Response #
The result contains a hits
array, listing the rights for the current user.
Each right is an object with the following properties:
controller
: API controlleraction
: controller's actionindex
: authorized or denied indexcollection
: authorized or denied collectionvalue
: one of the following value:denied
,allowed
, orconditional
{
"status": 200,
"error": null,
"result": {
"hits": [
{
"controller": "document",
"action": "get",
"index": "foo",
"collection": "bar",
"value": "allowed"
},
{
"controller": "document",
"action": "search",
"index": "foo",
"collection": "bar",
"value": "allowed"
},
{
"controller": "document",
"action": "write",
"index": "foo",
"collection": "bar",
"value": "denied"
}
]
}
Edit this page on Github(opens new window)