Skip to content

Slice 5: Staff & roles - #10

Merged
DanMat merged 1 commit into
nimbus-rebuildfrom
slice/staff-roles
Sep 6, 2026
Merged

Slice 5: Staff & roles#10
DanMat merged 1 commit into
nimbus-rebuildfrom
slice/staff-roles

Conversation

@DanMat

@DanMat DanMat commented Sep 6, 2026

Copy link
Copy Markdown
Owner

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

  • 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, and manage is declared for reports (a later slice).
  • Guide — a staff-roles section. Legacy roles map: waiter/host/busboy → 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

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>
@DanMat
DanMat merged commit f49c05c into nimbus-rebuild Sep 6, 2026
4 checks passed
@DanMat
DanMat deleted the slice/staff-roles branch September 6, 2026 01:01
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