fix(auth): OWNER has IT_ADMIN's rights in Prüfwerk (#982) #983

Merged
sharang merged 1 commits from fix/owner-role into main 2026-11-12 09:09:49 +00:00
Owner

Summary

Closes #982. Decided by Sharang (2026-11-12): map OWNER like IT_ADMIN.

  • OrgRole::Owner: OWNER from the token parses to it instead of Unknown.
  • Full read and write, like IT_ADMIN (ProductAccess::for_roles, the role gate).
  • What only an administrator may do now asks OrgRole::is_admin / TenantContext::is_admin (IT_ADMIN or OWNER), not IT_ADMIN alone:
    • manual findings;
    • seeing the git source;
    • licence policy and review decisions. The 403 now lists needs: [LEGAL, IT_ADMIN, OWNER].
  • The dashboard derives access from the same core function, so it follows. Its licence help texts and the docs (getting started DE/EN, manual findings, SBOM) name OWNER.
  • Unchanged: the other new RBAC bundles (PSIRT, DEVELOPMENT, …) still get no access, which fails closed. The rights catalogue is a separate decision.

Test plan

  • cargo fmt --all --check
  • clippy with -D warnings for compliance-core and compliance-agent, and for compliance-dashboard with --features server and --features web
  • compliance-core lib tests (261), including OWNER parsing and OWNER → full access
  • compliance-agent lib tests (1061), including the role gate matrix with OWNER (read and write), manual findings and licence decisions with OWNER

🤖 Generated with Claude Code

## Summary Closes #982. Decided by Sharang (2026-11-12): map OWNER like IT_ADMIN. - `OrgRole::Owner`: `OWNER` from the token parses to it instead of `Unknown`. - Full read and write, like IT_ADMIN (`ProductAccess::for_roles`, the role gate). - What only an administrator may do now asks `OrgRole::is_admin` / `TenantContext::is_admin` (IT_ADMIN or OWNER), not IT_ADMIN alone: - manual findings; - seeing the git source; - licence policy and review decisions. The 403 now lists `needs: [LEGAL, IT_ADMIN, OWNER]`. - The dashboard derives access from the same core function, so it follows. Its licence help texts and the docs (getting started DE/EN, manual findings, SBOM) name OWNER. - Unchanged: the other new RBAC bundles (PSIRT, DEVELOPMENT, …) still get no access, which fails closed. The rights catalogue is a separate decision. ## Test plan - [x] `cargo fmt --all --check` - [x] clippy with `-D warnings` for compliance-core and compliance-agent, and for compliance-dashboard with `--features server` and `--features web` - [x] compliance-core lib tests (261), including OWNER parsing and OWNER → full access - [x] compliance-agent lib tests (1061), including the role gate matrix with OWNER (read and write), manual findings and licence decisions with OWNER 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-12 08:48:25 +00:00
fix(auth): OWNER has IT_ADMIN's rights in Prüfwerk (#982)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m41s
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 20m36s
ca39450774
OrgRole::parse knew only IT_ADMIN, CXO, FINANCE, LEGAL and USER, so an
OWNER got no access at all. OWNER now parses to its own role with full
access, and what only an administrator may do (manual findings, the git
source, licence decisions) asks OrgRole::is_admin (IT_ADMIN or OWNER).
The other new RBAC bundles still get no access.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit aa022b0d0f into main 2026-11-12 09:09:49 +00:00
Sign in to join this conversation.