Skip to content

staff.permissions ​

1 method on staff.permissions. Each returns the answer's data and throws NoviqaError on a failed answer.

rights ​

GET/admin/v1/permissions/rights

List staff rights

Every staff right by name, for the permission screens.

More details

Rights: the staff member needs every one of: config.staff.

Returns
Promise<string[]>
The answer's data.
Errors
401auth.session_expired: session expired, sign in again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.permissions.rights()
bash
curl -X GET "$NOVIQA_API_URL/admin/v1/permissions/rights" \
  -H "Authorization: Bearer $NOVIQA_TOKEN"
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    "terminal.admin"
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.permissions.rights(options?: RequestOptions): Promise<string[]>