Skip to content

fix: enumerate all permissions for system-admin and admin roles#275

Merged
The127 merged 1 commit intomainfrom
fix/system-admin-all-permissions
Apr 25, 2026
Merged

fix: enumerate all permissions for system-admin and admin roles#275
The127 merged 1 commit intomainfrom
fix/system-admin-all-permissions

Conversation

@The127
Copy link
Copy Markdown
Owner

@The127 The127 commented Apr 25, 2026

Summary

  • system-admin previously had only virtual_server:create, so service users bound to it (e.g. portal-provisioner used by keyline-saas-admin-api to provision portal users on access-request approval) got 401 on every other call. Enumerate the full permission catalog (minus the system_user wildcard sentinel) for system-admin, and the same minus virtual_server:create for admin.
  • Plugs the orphan role:delete permission, which existed in the catalog but no role granted it.
  • Adds tests encoding the design rules: system-admin = admin ∪ {virtual_server:create}, system_user sentinel must not leak into operator roles, no duplicate perms per role, every Role constant is registered in AllRoles.

Test plan

  • go test ./internal/authentication/roles/... — 4 new tests pass
  • After release: portal-provisioner approve flow returns 200 on the saas-admin side (currently 401)

system-admin previously held only virtual_server:create, leaving service
users bound to it unable to perform any in-VS operation. Enumerate the
full permission set for system-admin (everything in the catalog except
the system_user wildcard sentinel), and for admin (system-admin minus
virtual_server:create). admin gains role:delete, which had no role
binding in the catalog.

Tests encode the design rules so the two lists can't drift apart.

Signed-off-by: karo <karolin.kostial@gmail.com>
@The127 The127 force-pushed the fix/system-admin-all-permissions branch from 2e297bf to 6209739 Compare April 25, 2026 09:04
@The127 The127 merged commit 09de058 into main Apr 25, 2026
8 checks passed
@The127 The127 deleted the fix/system-admin-all-permissions branch April 25, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant