Appearance
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/rightsList 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
401
auth.session_expired: session expired, sign in again403
auth.invalid_terminal: this terminal cannot be used here403
auth.otp_enrol_required: your group requires one-time codes: set them up to continue403
auth.password_change_required: you must change your password first403
forbidden: you do not have access to this action500
internal: something went wrongts
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[]>