diff options
| author | Claude Sonnet 4.6 | 2026-08-28 19:00:00 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-08-28 14:51:04 -0500 |
| commit | 58c6f7a9eedc77c7268dc350387f78f77d619eac (patch) | |
| tree | c1844964f1157f85a086402a14e343892a2be21e /gn_auth/templates/admin/dashboard.html | |
| parent | 3348d266228e1f4b374d0af6e33fe4948eb1bfaa (diff) | |
| download | gn-auth-main.tar.gz | |
The system-administrator role carries system:resource:assign-owner
(migration 20250729_02), but no endpoint used it. Sysadmins had no API
path to bootstrap ownership on a resource that has no owner yet.
Implement two endpoints in gn_auth/auth/system/admin/resources.py
(the blueprint skeleton was already wired in a preceding commit):
POST /auth/system/administration/resources/<resource_id>/assign-owner
Body: {"user_id": "<uuid>"}
Assigns the resource-owner role to the named user on the resource.
POST /auth/system/administration/resources/<resource_id>/revoke-owner
Body: {"user_id": "<uuid>"}
Revokes the resource-owner role from the named user on the resource.
Both check system:resource:assign-owner on the *system* resource, so a
sysadmin can grant/revoke ownership without being resource-owner
themselves.
Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
Diffstat (limited to 'gn_auth/templates/admin/dashboard.html')
0 files changed, 0 insertions, 0 deletions
