Hi, is it possible to get all of a users permissio...
# general
h
Hi, is it possible to get all of a users permissions, including relationships? Calling getUserPermissions doesn't seem to fetch all the relationships
d
Hi @Hassan Munir, Yes,
getUserPermissions
can fetch relationship-based permissions, but you need to enable ABAC (Attribute-Based Access Control) support explicitly in your request. heres a cURL example:
Copy code
curl --location '<http://localhost:7766/user-permissions>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <api key>' \
--data '{
  "user": {
    "key": "eddie"
  },
  "resource_types": [
    "document",
    "__tenant"
  ],
  "context": {
    "enable_abac_user_permissions": true
  }
}'
Please see the following docs for a more comprehensive explanation about enabling ABAC in user permissions: https://docs.permit.io/how-to/enforce-permissions/user-permissions/