Core
API v1.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

getUserRights #

Gets the detailed rights granted to a user.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/users/<_id>/_rights
Method: GET

Other protocols #

{
  "controller": "security",
  "action": "getUserRights",
  "_id": "<kuid>"
}

Arguments #


Response #

Returns a hits array of objects. Each object is a security right granted or denied to the user:

  • controller: impacted Kuzzle controller
  • action: impacted controller action
  • index: index name
  • collection: collection name
  • value: tell if access is allowed or denied. If closures have been configured on the detailed scope, the value is conditional.
{
  "status": 200,
  "error": null,
  "result": {
    "hits": [
      {
        "controller": "auth",
        "action": "login",
        "value": "allowed"
      },
      {
        "controller": "document",
        "action": "get",
        "index": "foo",
        "collection": "bar",
        "value": "allowed"
      },
      {
        "controller": "document",
        "action": "create",
        "index": "foo",
        "collection": "bar",
        "value": "denied"
      }
    ]
  }
}