docs(backlog): record AUTH-PERMISSIONS-MIGRATION + ART-DEMOTE-NOTIFICATION
Two new tech-debt entries surfaced by Session 2: AUTH-PERMISSIONS-MIGRATION — Crewli is role-based today; RFC-TIMETABLE §9 references permission strings. Phase A (2026-05-08) chose Option B (role-based, with permission strings as docblock references). The eventual cross-cutting migration is tracked here. Trigger: customer/charter requirement, not internal preference. ART-DEMOTE-NOTIFICATION — Session 2's daily option-expiry command writes activity log only; e-mail to the project leader waits for the post-Accreditation notification framework. Also append a Session-2 paragraph to the existing RFC-TIMETABLE-V0.2-DOC-CLEANUP entry describing the §9 permission-string mapping decision. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -700,6 +700,17 @@ Session 1 surfaced deze drift; Step 7 reduceerde tot een in-place rewrite van
|
||||
**Wat:** Bij de eerstvolgende RFC v0.2 amendement, vervang of verwijder de
|
||||
`ARCH-PLANNED-MODULES.md` cross-references in §1 en §15. Dit is geen blocker
|
||||
voor implementatie van Sessions 2–6.
|
||||
|
||||
**Aanvulling Session 2 (2026-05-08):** RFC §9 noemt vier permission-strings
|
||||
(`events.view_program`, `events.manage_program`, `organisations.manage_artists`,
|
||||
`organisations.manage_settings`). De implementatie-keuze (Phase A Option B)
|
||||
bindt deze permissions aan Spatie roles in plaats van aan `Permission`-rijen,
|
||||
omdat de bestaande codebase rolgebaseerd is en migratie naar fine-grained
|
||||
permissions cross-cutting is. De docblocks van `ArtistPolicy`,
|
||||
`ArtistEngagementPolicy`, `StagePolicy`, `PerformancePolicy` en `GenrePolicy`
|
||||
documenteren de exacte mapping. Cross-cutting migratie wordt gevolgd onder
|
||||
`AUTH-PERMISSIONS-MIGRATION` (zie hieronder).
|
||||
|
||||
**Prioriteit:** Laag — documentatie-hygiëne, niet code.
|
||||
|
||||
---
|
||||
@@ -725,6 +736,62 @@ de divergentie totdat een legitieme amendement langskomt.
|
||||
|
||||
---
|
||||
|
||||
### AUTH-PERMISSIONS-MIGRATION — Migrate alle policies van hasRole() naar hasPermissionTo()
|
||||
|
||||
**Aanleiding:** Crewli gebruikt vandaag uitsluitend Spatie *roles*; geen
|
||||
`Permission`-rijen worden geseed en geen policy roept `hasPermissionTo()`
|
||||
of `Gate::can()` tegen permission-strings aan. RFC-TIMETABLE v0.2 §9
|
||||
beschrijft de toegangscontrole in termen van permission-strings
|
||||
(`events.manage_program`, etc.); Phase A van Session 2 (2026-05-08)
|
||||
besloot Option B — de permission-strings worden in policy-docblocks
|
||||
gedocumenteerd en role-based geautoriseerd. Een hybride aanpak (perms
|
||||
seeden maar niet gebruiken) werd afgewezen omdat dat strings creëert
|
||||
zonder source-of-truth-status.
|
||||
|
||||
**Wat:** Eén dedicated cross-cutting sprint die ALLE policies (niet
|
||||
alleen Artist-domein) overzet van `hasRole()` naar `hasPermissionTo()`.
|
||||
Inclusief:
|
||||
- `PermissionSeeder` voor de complete set permissions die we vandaag
|
||||
via roles uitdrukken (per-domein audit van bestaande policies)
|
||||
- Policy-by-policy refactor met behoud van semantiek
|
||||
- Policy-tests bijwerken (bestaande tests gebruiken role-strings)
|
||||
- Documentatie in `dev-docs/CLAUDE.md` (`Roles and permissions`-blok)
|
||||
|
||||
**Trigger:** Klant- of charter-vereiste — een specifieke gebruiker
|
||||
moet wel X kunnen maar niet Y, en X+Y delen vandaag dezelfde rol.
|
||||
Niet: interne preferentie of "het is netter".
|
||||
|
||||
**Reference:** Session 2 Phase A (2026-05-08) Option B beslissing;
|
||||
`feedback_authorization_pattern` user-memory (intent-only — niet in
|
||||
auto-memory geschreven door file-protect hook).
|
||||
|
||||
**Prioriteit:** Laag — wachten op concrete operationele behoefte.
|
||||
|
||||
---
|
||||
|
||||
### ART-DEMOTE-NOTIFICATION — Notify project-leader on option-expiry demotion
|
||||
|
||||
**Aanleiding:** RFC-TIMETABLE v0.2 noemt notificatie van de project-leader
|
||||
wanneer een Option afloopt en automatisch gedemoteerd wordt naar Draft
|
||||
(via de `artist:demote-expired-options` daily command, Session 2 Step 10).
|
||||
Het notificatie-framework landt pas post-Accreditation; daarom schrijft
|
||||
de Session 2 command alleen een `option_expired` activity-log entry, geen
|
||||
e-mail.
|
||||
|
||||
**Wat:** Wanneer notification-framework live is, hook het in de command
|
||||
in: na elke `transitionStatus()` succes een notificatie naar de project-
|
||||
leader (en optioneel de `program_manager` rol op het evenement). Houd
|
||||
rekening met aggregatie als veel Options tegelijk verlopen — niet één
|
||||
mail per Option.
|
||||
|
||||
**Reference:** Session 2 commit `feat(timetable): DemoteExpiredOptions
|
||||
scheduled command`; `app/Console/Commands/Artist/DemoteExpiredOptions.php`.
|
||||
|
||||
**Prioriteit:** Medium — wachten op notification-framework, maar wel een
|
||||
zichtbare gap voor program managers tot dan.
|
||||
|
||||
---
|
||||
|
||||
### TECH-01 — Bestaande tests bijwerken na festival/event refactor
|
||||
|
||||
**Aanleiding:** Na toevoegen parent_event_id worden bestaande tests
|
||||
|
||||
Reference in New Issue
Block a user