Permissions

Add permission to user

Add a single user-level permission to a user.

Privileged-grant policy (2026-08-13, see app/db/permissions.py): the guard moved from "refuse every NEVER_ASSIGNABLE name" to the same split app/db/admin.py already applies to roles — system_admin refused outright, admin/view_all_pvs allowed with an EXPLICIT grant_privileged_role and audited in the write's own transaction. The check itself runs in the DB layer, inside that transaction: doing it up here would leave a check-then-write race.

post/api/users/{user_id}/permissions

Path parameters

user_idinteger required

Headers

x-api-tokenstring nullable

Request body

permission_idinteger required
grant_privileged_roleboolean

Response

Successful Response

{"stackTrail":"paths:/api/users/{user_id}/permissions:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes

No recorded changes to this endpoint across all 1 revision of this API.