Repository navigation
Conversation
op_role_grant / op_time_window / op_position_auto_role, seeded to reproduce today's server checks (SuperAdmin, Admin, own-record, the on-playa + walk-up rules). can() in lib/permissions.ts; pure matching in permissions.logic.ts with unit tests. No route calls it yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt (#806) Per Chipper: auto-role on position assignment doesn't touch permissions; it gets its own issue. Rename avoids confusion with the existing op_role_grant_roster (roles-on-login). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mew: lead access comes from the lead position held; who may be assigned to a lead position is a separate question (#807). Role grants stay for VCs / area roles. Both grantee types live side by side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 18, 2026
Open
Keep role/position/signed_in/anyone grantees and everyone/self/shift scope. Drop department scope and event-date windows. A position now only counts on the shift being acted on, and 'shift' scope requires the subject on the shift too. Add add_override, volunteer_notes:view and volunteer_passcode:reset, seeded to today's behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Mew (2026-11-27): hold until after the permissions meeting. |
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.
#804 step 2: permission grant tables +
can()(unused)Adds the tables and the single server-side check. No route calls
can()yet (that's step 3), so merging changes nothing.Model (agreed in #census 2026-10-18)
One row = one grant. A row is
who×permission×scope×window×place. Grants only allow: any matching row lets the action through, so row order never matters. Later, App Admin edits these rows from a screen (Mew).anyone(signed out too),signed_in,role,positioneveryone,self(the subject is the actor),shift(actor and subject are on the shift being acted on)op_time_window: shift-anchored start/end ± minutes; NULL = openany,on_playa,off_playaPermission catalog
client/src/lib/permissions.logic.ts. Added in this PR:shift_volunteers:add_override: ignore full slots and required rolevolunteer_notes:viewvolunteer_passcode:resetSeed = today's behavior exactly
No lead, Scheduler, VC or Volunteer Assistant grants are seeded. Those get configured in step 4.
Tested
node --import tsx --test tests/unit/permissions.test.ts: 6/6tsc --noEmitis clean.can()was run end-to-end against fixtures: 14/14 scenarios:Next
can()one group at a time, with parity tests.Footer
2026.F.00806.C. This conflicts with #805 on the Footer, so rebase whichever merges second. Migration 021; #808 uses 022.🤖 Generated with Claude Code