Slice 5: Staff & roles - #10
Merged
Merged
Conversation
Real role separation, now that fine-grained plugin capabilities exist in core. - Declares fine-grained actions on the capability: read, write, floor, kitchen, manage (was read/write only). - Re-gates the terminals: Floor (tables) and Orders (incl. taking payment) → danmat.restaurant:floor; Kitchen display → danmat.restaurant:kitchen. Each admin action inherits its page's gate, so a cook (:kitchen) cannot take payment and a waiter (:floor) cannot advance kitchen tickets; a manager holds all three. read/write remain for the MCP/agent surface. `manage` is declared for reports (a later slice). - Guide: staff-roles section (which grant does what). Legacy roles map: waiter/host/busboy→floor, cook→kitchen, manager/admin→manage(+floor+kitchen). Staff users are granted these in Nimbus's own roles/tokens admin. - Test: RestaurantPluginTest (no DB) — register() declares the fine actions as grants and gates each terminal on the right one. cs-fixer + PHPStan green locally; phpunit runs in CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Real staff role separation, consuming the fine-grained plugin capabilities just shipped in core (NimbusCMS#210, ADR 0030) — closing ledger finding F4.
What's here
read,write,floor,kitchen,manage(was read/write only).danmat.restaurant:floor; Kitchen display →danmat.restaurant:kitchen. Each admin action inherits its page's gate, so a cook (:kitchen) cannot take payment and a waiter (:floor) cannot advance kitchen tickets; a manager holds all three.read/writeremain for the MCP/agent surface, andmanageis declared for reports (a later slice).floor, cook →kitchen, manager/admin →manage(+ floor + kitchen). Staff are Nimbus users granted these in Nimbus's own roles/tokens admin (the plugin declares + gates; it doesn't provision users).Tests
RestaurantPluginTest(no DB) —register()declares the fine actions as grants (labelled legibly) and gates each terminal on the right action.Note: table→staff assignment (a waiter to a table) is still deferred — it needs a plugin-facing way to read Nimbus users, which would be its own core finding; role separation doesn't require it.
cs-fixer + PHPStan L6 green locally; phpunit in CI (8.2 + 8.3).
🤖 Generated with Claude Code