feat(roles): who holds a function (RBAC step 5) #124

Merged
sharang merged 3 commits from feat/function-holders into main 2026-11-11 21:44:56 +00:00
Owner

RBAC plan step 5, registry part: an endpoint that answers who holds a role-dataset function, so that a Werkmeister step can name a function.

  • GET /v1/tenants/{id}/role-dataset/holders?function=F[&document=|&product=|&area=] returns the holders in the scope, the function's effective deputies, and a status (besetzt, rolle_offen, nicht_anwendbar). Errors: unknown_function, and scope_required for a function held per document, product or area.
  • Deputies are listed whatever decision types they cover. They stand in for decisions, so a step that is worked rather than decided counts only the holders; Werkmeister decides that.
  • /resolve now goes through the same matching. For a decision type, only deputies covering it count, as before.
  • Access: Werkmeister reads it with its existing tenants.read grant. A user token stays in role-dataset.user, tenant-scoped.
  • Not touched: managementHolders in contract_documents.go, which keeps holders only for the AVV.
  • No migration, no catalogue change, no orca change.

The Werkmeister PR follows.

🤖 Generated with Claude Code

https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf

RBAC plan step 5, registry part: an endpoint that answers who holds a role-dataset function, so that a Werkmeister step can name a function. - `GET /v1/tenants/{id}/role-dataset/holders?function=F[&document=|&product=|&area=]` returns the holders in the scope, the function's effective deputies, and a status (`besetzt`, `rolle_offen`, `nicht_anwendbar`). Errors: `unknown_function`, and `scope_required` for a function held per document, product or area. - Deputies are listed whatever decision types they cover. They stand in for decisions, so a step that is worked rather than decided counts only the holders; Werkmeister decides that. - `/resolve` now goes through the same matching. For a decision type, only deputies covering it count, as before. - Access: Werkmeister reads it with its existing `tenants.read` grant. A user token stays in `role-dataset.user`, tenant-scoped. - Not touched: `managementHolders` in contract_documents.go, which keeps holders only for the AVV. - No migration, no catalogue change, no orca change. The Werkmeister PR follows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang added 1 commit 2026-11-11 21:14:54 +00:00
feat(roles): who holds a function (RBAC step 5)
ci / shared (pull_request) Successful in 12s
ci / test (pull_request) Failing after 5m56s
ci / image (pull_request) Skipped
9c2e23a036
GET /v1/tenants/{id}/role-dataset/holders?function=…[&scope] answers
who holds a role-dataset function now: the holders in the scope, the
effective deputies of the function and open/filled/not applicable.
Werkmeister reads it (tenants.read) when a step names a function.

It shares the matching with /resolve, which now goes through it; for a
decision type, only deputies covering it count, as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang added 1 commit 2026-11-11 21:15:35 +00:00
feat(roles): the holders answer names the function
ci / shared (pull_request) Successful in 11s
ci / test (pull_request) Failing after 5m57s
ci / image (pull_request) Skipped
79588bef05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang added 1 commit 2026-11-11 21:37:54 +00:00
test(server): the workers stop with their context; client addresses
ci / shared (pull_request) Successful in 11s
ci / test (pull_request) Successful in 5m32s
ci / image (pull_request) Skipped
351c7356fd
The coverage gate sits at 70% and main is just above it; these cover
the mail, outbox and reconcile loops and clientIP, which no test ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf
sharang merged commit 63ea5790c7 into main 2026-11-11 21:44:56 +00:00
Sign in to join this conversation.