Skip to content
MantraWorx
Developers › Roles and permissions

Developers

Roles and permissions

How access is decided: areas, the view, write and admin levels, and how to read your own.

On this page

MantraWorx decides access per area of the product. Each area has a key, and each person holds one of three levels on it.

The three levels#

LevelWhat it allows
viewRead what you have access to.
writeCreate and edit. Includes view.
adminManage and delete. Includes write and view.

If you hold no level for an area, requests to it return 403.

Some of the keys#

KeyArea
worx.projects, worx.stories, worx.tasks, worx.sprintsWorxCenter
hr.employees, hr.leave, hr.performancePeople and HR
hr.payroll, finance.salary, finance.reimbursementFinance
docs.documentsDocuments
chat.messagesWorxTalk
admin.users, admin.roles, admin.departmentsAdmin and access
analytics.reportsReports

This is a short list. There are more keys, and your administrator controls which levels each role holds. To see yours, ask the API.

Read your own permissions#

GET /api/users/me/permissions

bash
curl https://<your-host>/api/users/me/permissions \
  -H "Authorization: Bearer $TOKEN"

The response maps each key to your level. It is shown here with example values.

json
{
  "permissions": {
    "docs.documents": "write",
    "worx.tasks": "write",
    "hr.leave": "view"
  },
  "headedDepartmentIds": [],
  "hasManagedUsers": false
}

When access is refused#

A call you are not allowed to make returns 403. The body names what was needed, so you can show a useful message.

json
{
  "error": "Insufficient permissions",
  "required": "write",
  "component": "docs.documents",
  "reason": "…"
}

Tip: Check your permissions once after sign-in, and hide actions you cannot use. The server still checks every request, so hiding a button never replaces the check.

Need more help?

Can’t find what you need? Talk to the team.

Contact support