Skip to content

Shift admin controls (cancel/edit/reschedule) + role & permissions redesign #731

Open

Description

@mbhewitt

Requested by Mew 2026-09-05. Two concrete shift-page features + a broader roles/permissions rethink. Grouped because the shift controls depend on the permission model.

Part A — Shift-page admin controls (concrete, shippable)

  • Add Cancel / Edit / Reschedule buttons on each shift's page.
    • Initially gated to super admins (see Part C for the eventual model).
    • "Cancel" already exists as a data path (canceled shifts fire notification emails, e.g. Art Tour 2026-09-03) — this exposes it in the UI. "Reschedule" = change start/end time; "Edit" = other shift fields.
    • Cancel/reschedule should reuse the existing shift-canceled / (and a new shift-rescheduled?) volunteer notification flow.

Part B — Show canceled shifts in the list (strikethrough)

  • Canceled shifts are currently hidden from the shift list. Instead, show them with strikethrough so it's clear a shift existed and was canceled (avoids "did it ever exist?" confusion).
  • Applies to the agenda (Schedule.tsx) and any admin shift lists.

Part C — Roles & permissions redesign (design-heavy; post-event)

Rethink the tiers and what each can access. Mew's initial direction:

  • Leads — a more limited set than today.
  • Coordinator — NEW role: more access than Leads, less than Leadership.
  • Leadership — replaces today's Admin.
  • (TBD top tier) — replaces today's Super Admin (name TBD).

Proposed starting matrix (for discussion — not final):

Capability Lead Coordinator Leadership Top (TBD)
Check volunteers in/out, review ✅ ✅ ✅ ✅
Add/remove volunteers on own shift ✅ ✅ ✅ ✅
Cancel/edit/reschedule shifts ✕ limited? ✅ ✅
Manage shift types/positions/categories ✕ ✕ ✅ ✅
Role grants / user management ✕ ✕ limited ✅
QR codes / reports / data export ✕ ✅? ✅ ✅
System/config, provisioning ✕ ✕ ✕ ✅

Notes / scope

  • This is a migration: renaming roles touches op_roles names, every authz check (checkIsAdmin/checkIsSuperAdmin → new predicates), UI gating (pageList, footer sections, per-page guards), and the seed/reference data. Needs a design pass + a mapping of old→new roles before any code.
  • Keep backward-compat during transition (map existing Admin→Leadership, SuperAdmin→Top) so no one loses access mid-migration.
  • Not a mid-event change. Part A/B could ship sooner; Part C is a deliberate post-event redesign.

Related: #719 (restrict who can sign up for certain shift types), #730 (audit logging — pairs with permission changes).

Activity

  1. mbhewitt commented on Sep 5, 2026

    @mbhewitt
    OwnerAuthor

    Part A — Reschedule: notification + penalty rules (Mew 2026-09-05)

    When a shift is rescheduled, in addition to changing the time:

    1. Email everyone currently on the shift about the reschedule (old time → new time), to all signed-up volunteers.
    2. Attach new calendar items — an updated ICS with the new start/end so they can re-add it to their calendar. (Reuse op_email_queue.ics_attachment/ics_filename, same path the newsletter/QR calendar flow uses.)
    3. Include a note that they're free to remove themselves from the rescheduled shift without penalty (the time changed out from under them, so dropping it is penalty-free).
    4. No-show penalty is waived on a rescheduled shift — anyone who no-shows the new time is NOT penalized.

    Implementation notes:

    • feat: add roles page #3/feat: add legend in volunteers page #4 need a way to mark a shift (or its signups) as reschedule-exempt so the no-show/penalty logic (SAP points etc.) skips it. Likely a flag on the shift-time (e.g. rescheduled_at / penalty_exempt) that the no-show finalizer and any drop-penalty check honor.
    • Mirror the existing shift-canceled email flow for delivery; this is a new shift-rescheduled category.
  2. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Role-based security design session (2026-09-10) — the "op_roles is a junk drawer" analysis

    Pulled the live op_roles table (~50 rows). It conflates 6 distinct concepts all stored as "roles," which is why authz feels confusing — you can't cleanly ask "who can do X":

    1. Access/security — SuperAdmin (9 holders), Admin (30). The only true permission-roles.
    2. Attestations / signed flags — Signed Behavioral Standards, BurnerProfileUpdated, Data Analysis Release Signed, WAP_V_override, EmailUnsubscribed, CensusTicket, emergencyContact, campingLocation, NewWAPstartdate, Passed online RS-test-out. Facts about a person (yes/no state), not jobs.
    3. Training completions — Training{Welcome,CensusBasics,RandomSampling,OutReach,DataEntryWiz,DataBeastDriver}Complete, Training. Certifications earned.
    4. Job/position titles — Shift Lead, Census Lab Host, Data Entry, Census Random Sampler, Census Driver, IT Tech, DataBeast Technician, BxB Sampler, Blog Writer, Data Visualization, Special Project.
    5. Department leads — Sampling/Construction/Training/OutReach/Data Entry/Gate Sampling/Airport Sampling Lead.
    6. Camp/team membership — Core Crew, Staff, CensusLabCamp, CounterCultureCamp, Camping With Census.

    Recommended model (separate the concepts):

    Server-side enforcement (the key security fix): today some gating is client-side (checkIsSuperAdmin(accountType, roleList) in React) — that hides UI but does not stop a determined user. Real enforcement must be 100% server-side: every mutating endpoint calls can(session, permission) before acting; client checks stay only to hide UI, never as the lock. (lib/authz.ts already does object-level isAdmin/isSuperAdmin/isOwnerOrAdmin — extend that into a general permission layer.)

    Safe rollout (not a live prod experiment):

    1. Add a server-side permission layer first — a can() fn backed by a role→permission map defined in code. No schema churn, zero data risk.
    2. Every new feature (budget #743, notes Shift-level notes: append-only, attributed, reviewable (overall-shift observations) #744, needs-list) checks permissions from day one.
    3. Gradually reclassify the junk-drawer roles into proper tables — a later migration, not a blocker.

    Priority (Chipper, 2026-09-10): this is the #1 change and should be built FIRST because every other feature touches it; explicitly NOT to be hot-swapped in production while people are actively using it.

  3. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    🔐 Designating this as the canonical Role-Based Security epic (Chipper priority #1, 2026-09-10)

    Role/permission work is currently fragmented across 7 issues. Consolidating under #731 as the single epic we build first. Sub-issues:

    Build order (Chipper): role-based security FIRST, then audit logging (#730) rides on top of the permission layer. Design + the "op_roles is a junk drawer of 6 concepts" analysis is in the comment above. Not to be hot-swapped in live production.

  4. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Requirement: form/feature-level gating + DYNAMIC (capacity/interest-based) visibility (Chipper 2026-09-10)

    Role-based security must gate not just API actions but which forms/features a user can even see. Real examples:

    • Some forms are restricted-audience — only certain roles (e.g. core crew / people camped with us) should see or submit them. Randoms shouldn't be able to propose internal changes.
    • Some forms are open to any authenticated volunteer (e.g. a public data/research-request form).
    • Dynamic gating: visibility can depend on live conditions, not just a static role — e.g. a capacity-limited signup should be shown only while space remains and can be toggled by admins based on interest/availability. So the permission model needs conditional visibility (role AND admin-toggle AND capacity), not just hasRole().

    Design implication: the can(session, permission, context) layer should accept context (capacity remaining, admin on/off switch), and the front-end should hide/show forms based on the same server-evaluated gate (never client-only). This generalizes the existing per-form audience needs.

  5. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Refinement (Chipper 2026-09-10): a form's audience should map to a configurable SET of roles (admin-editable), not a hardcoded single role. So the gate is: form → {allowed role set} + optional dynamic conditions (capacity, admin toggle). Any form can be pointed at any combination of roles without code changes.

  6. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    🧩 DRAFT: Permission model + role→permission map (Claude, 2026-09-10) — for Chipper's review

    Grounded in the 73 real API endpoints. Two-layer model: permissions (fine-grained actions the server checks) bundled into roles. Attestations/training/camp membership are pulled OUT of "roles proper."

    A. Permission catalog (resource : action) — derived from the API

    • Volunteer: volunteer:read_own volunteer:read_any volunteer:edit_own volunteer:edit_any volunteer:list
    • Shift ops: shift:signup_self shift:remove_self shift:add_other shift:remove_other shift:checkin shift:cancel shift:add_note
    • Shift config: shift_type:manage shift_position:manage shift_category:manage shift_time:manage dates:manage
    • SAP: sap:read sap:assign sap:manage (upload/issue/offbook/notes/email)
    • Roles: role:read role:grant_revoke role:manage_definitions role:manage_display
    • Notes: note:read_shift note:add_shift note:read_volunteer
    • QR / provision / system: qr:create qr:manage device:provision system:read_only_toggle settings:manage
    • Reports: report:view
    • Forms (gated by role-set): form:project_submit form:item_submit form:ranch_signup form:data_request
    • Public: contact:submit

    B. Roles (collapsed to authority-bearing) → permissions

    Role Gets
    Public (unauth) contact:submit, form:data_request
    Volunteer (authed) read/edit_own, signup/remove_self, own shifts, own SAP choice
    Shift Lead + shift:checkin shift:add_note note:read_shift, read roster + BS status of their shift
    Department Lead (Sampling/Construction/Training/Outreach/DataEntry/Gate/Airport) + add/remove_other & manage shift config within their area
    Admin + volunteer:read_any/edit_any/list, all shift config, dates:manage, sap:read/assign, shift:cancel, report:view
    Super Admin + role:grant_revoke/manage_definitions/manage_display, sap:manage, settings:manage, qr:manage, system:read_only_toggle

    C. Membership roles (NOT authority — they gate form audiences only)

    Core Crew, Camped-with-us (CensusLabCamp/CounterCultureCamp), Previous Ranch Crew → grant form:project_submit / form:item_submit / form:ranch_signup per the configurable role-set map (#731 gating comment). Dynamic conditions (capacity/admin-toggle) layer on top.

    D. Pulled OUT of roles (become flags/records, not permissions)

    • Attestations: Signed Behavioral Standards, BurnerProfileUpdated, Release Signed, EmailUnsubscribed, WAP override → volunteer flags.
    • Training completions → training records (can be prerequisites for a role/permission, not roles).

    Open for Chipper

    1. Do Department Leads get area-scoped admin, or is "Lead" just check-in + notes? (I assumed area-scoped.)
    2. Who approves budget/purchase requests — Super Admin only, or a dedicated budget:approve role? (private module)
    3. Should form:data_request truly be public, or authed-volunteer only?
  7. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    ✏️ CORRECTION (Chipper 2026-09-10): NO "SuperAdmin" — single Admin role = everything

    Chipper: "SuperAdmin isn't actually a thing, I hate it." Collapse the two top tiers into one:

    • Admin = the single top authority, can do everything (roles, SAP, settings, budget approvals, all the former super-admin powers fold in here).
    • Membership = a small select group — "just the people on this channel, and that's it." Currently Admin has ~30 holders and SuperAdmin ~9; the merged Admin should be trimmed to the ~9-person core group, not 30.
    • The current broader "admins" who aren't in that core group move DOWN into the Lead tiers (Shift Lead / Department Lead) which carry the narrower powers they actually need.

    Revised role ladder: Public → Volunteer → Shift Lead → Department Lead → Admin (everything, select core group). Drop the SuperAdmin row from the table above; merge its permissions into Admin. Question #2 (who approves purchases) is answered: Admin.

  8. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    ✏️ Refinement (Chipper 2026-09-10): use EXISTING roles; push the operational slice of today's "Admin" down to Shift Lead

    Two points:

    1. Don't invent new roles — the roles pretty much all already exist (see the ~50 in op_roles). This work is about tying functionality to the roles we already have, not creating a new vocabulary.
    2. Shift Leads should get extra abilities = a subset of what's currently gated behind "Admin." Today "Admin" is a monolith; leads have to be full Admins just to do on-playa lead work. Instead, decompose the current Admin capability and grant the operational part to the existing Shift Lead role.

    Which of today's Admin-gated abilities move to Shift Lead (the stuff a lead actually needs on-playa):

    • shift:checkin — check volunteers in/out (their shift)
    • shift:add_other / shift:remove_other — add/remove volunteers on their shift
    • note:read_shift / note:add_shift — read + add shift/volunteer notes
    • read the roster + BS status for their shift

    What stays Admin-only (the trimmed core group): role grant/revoke + role definitions, SAP management, shift-type/position/category/date config, settings, QR management, read-only toggle, budget approvals.

    Net: the same people who are shift leads gain the operational admin abilities via the Shift Lead role — no full-Admin needed, no new roles. Admin shrinks to the sensitive/config/authority powers for the core group.

  9. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Shift Lead — specific configurable abilities + scoping (Chipper 2026-09-10)

    Chipper's explicit list of abilities to make configurable on the Shift Lead role:

    • View the volunteers list / individual volunteer profile details — for volunteers on their shift (volunteer:read, scoped to people on shifts they lead — not necessarily the global list).
    • Add notes associated with a volunteer — note:add_volunteer (new distinct permission).
    • Add notes associated with a shift — note:add_shift.
    • Notes in general (add).

    Scoping is the key nuance: a Lead's abilities are scoped to their shift / shift-types, not global. So can(session, permission, context) must check shift/shift-type ownership:

    • Viewing volunteer profiles → only volunteers on the lead's shifts.
    • Note history: Chipper unsure whether a lead needs to view note history outside their own shift-types — leaning no. So default note:read scope = the lead's own shift-types; global note-history stays Admin.

    Updated permission list gains: note:add_volunteer (distinct from note:add_shift), and every Lead permission carries a scope = own-shifts/own-shift-types qualifier. Admin = unscoped (all).

  10. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Add a VC (Volunteer Coordinator) level for notes (Chipper 2026-09-10)

    There should be a VC-level note-access tier — an intermediate scope between Shift Lead and Admin:

    • Shift Lead → notes scoped to their own shifts / shift-types.
    • VC (Volunteer Coordinator) → broader note access across the volunteers/shifts they coordinate (wider than a single lead's shift, narrower than Admin's global).
    • Admin → global/unscoped.

    So notes gain a 3-tier read scope: own-shift (Lead) → coordination-area (VC) → all (Admin). VC is an existing coordination responsibility; tie note visibility to it rather than forcing VCs to be Admins.

    (Assumption: "VC" = Volunteer Coordinator — Chipper to confirm the exact scope boundary for a VC vs a Dept Lead.)

  11. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    VC (Volunteer Coordinator) = possibly a NEW role; broad volunteer READ + "Management" same bucket (Chipper 2026-09-10)

    Refinement — VC is broader than "coordination-area" scope:

    • VC / Volunteer Coordinator can see a volunteer's full note history and everything associated with each volunteer — essentially everything an Admin can see in Shiftboard, surfaced in the app. So VC = global volunteer READ (all volunteers, full note/history, associated data), just without the write/config/authority powers.
    • "Management" lumps into the same bucket — same privileges as VC.
    • Chipper: this one might be a NEW role in the system (unlike the others, which already exist). ⚠️ Flag: create a Volunteer Coordinator role if it doesn't exist.

    Updated notes/read scope ladder:

    • Shift Lead → own shifts/shift-types
    • VC / Management → all volunteers, full note history + everything associated (read; Shiftboard-Admin-equivalent visibility)
    • Admin → everything incl. write, config, roles, SAP, settings

    So VC/Management is a read-broad tier: sees all, changes little. Distinct from Admin (the small core group that can do everything).

  12. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    🎛️ Centerpiece UX: a front-end role × feature configuration matrix (Chipper 2026-09-10)

    The whole system should be data-driven and admin-editable — not hardcoded. Chipper's expectation:

    a front-end available page that lets you determine which of these processes/features are available to each of the roles.

    So the deliverable is a permission-matrix admin page:

    • Rows = features/processes (the permission catalog: view volunteer list, check-in, add shift note, add volunteer note, manage shift config, grant roles, approve purchases, submit project form, ranch signup, …).
    • Columns = roles (Authenticated Volunteer, Shift Lead, VC/Management, Admin, + membership roles like Core Crew / Previous Ranch Crew).
    • Cells = toggle (does this role get this feature). Admin edits it live; no code deploy to re-map.
    • Backed by a role_permissions table (role_id × permission_key); the server-side can() reads it; the UI hides/shows features from the same source.

    Where "Authenticated Users" fit: the base Authenticated Volunteer is just another column/role in the matrix — the default baseline every logged-in user has. Whatever's toggled on for that base role = what a plain authenticated volunteer can do. No special-casing; it's configured exactly like the others.

    This makes the matrix the single source of truth: roles already exist, features are enumerated, and the grid ties them together — editable, server-enforced. (Extends #588 role-roster admin UI, #500 roles-admin clarity.)

  13. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Role assignment unchanged; role definition happens on the new setup page (Chipper 2026-09-10)

    • Granting a role to a person = works the same as today (existing assignment flow, unchanged).
    • What changes: the new setup page is where you create/define a role and determine exactly how it works — i.e., configure its feature/permission cells in the matrix at creation time (and edit later).

    So the flow is: create role → set its capabilities on the setup page → then assign it to people the same way as now. The setup page owns role definition + capability config; assignment stays put.

  14. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Role setup page also configures HOW a role is acquired (auto-grant rules) (Chipper 2026-09-10)

    The role setup page should expose a third facet beyond capabilities + assignment: how a person gets the role in the first place — configurable on the front-end.

    Many roles are auto-granted by system events today (hardcoded):

    • Finishing Random Sampler training (on Hive, or in-system via the "click to complete" button) → auto-grants the Census Random Sampler role.
    • Same pattern for other training-complete → role grants (the training/confirmation/[code] handler writes op_volunteer_roles).
    • Attending the ranch → Previous Ranch Crew (proposed).

    Chipper wants that trigger→role mapping to be configurable on the same role setup page, not baked in code.

    So the role setup page owns 3 things per role:

    1. Capabilities — the feature matrix (what it can do).
    2. Acquisition rules — the triggers that grant it: manual, and auto-grant on event (training complete, shift-history, ranch attendance, etc.) — a configurable event→role map.
    3. Assignment — manual grant flow (unchanged).

    Makes the training/event → role wiring data-driven instead of hardcoded per-training. (Ties to #426 roles-on-join, #253 training-completed endpoint, and the training→role_id linkage in training/confirmation.)

  15. mbhewitt commented on Sep 10, 2026

    @mbhewitt
    OwnerAuthor

    Setup is a uniform boolean toggle grid; includes override perms; page is Admin-only (Chipper 2026-09-10)

    • Same setup template for every role — the config UI is identical role-to-role; only the values differ. (Chipper + Claude will sit down and walk the full role list to decide what each gets — a TODO working session.)
    • Mostly true/false toggles. Examples she named:
      • Can they see other people's profiles? Y/N
      • Can they check someone in? Y/N
      • Can they override built-in checks (e.g., the overlap / double-booking guard)? Y/N ← new permission category: override:* (override system guardrails)
      • Can they give someone else a role? Y/N
    • New permission group — Overrides: override:overlap (double-booking), and likely siblings (override:eligibility, override:capacity, override:read_only) — each a per-role boolean. These let a role bypass a normally-enforced check.
    • Access to the role-setup page itself = top Admin tier only (Chipper said "super admin"; per the earlier decision that collapses to the single Admin = small core group). Managing roles/permissions is the most privileged action, so it's gated to that core group.

    Permission catalog gains an "Overrides" section; the setup page is the Admin-only home for capabilities + acquisition rules + (uniform) toggles.

  16. 12 remaining items

  17. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    "Self" is its own scope (Chipper, 2026-10-17)

    "they have different permissions on themselves than they do on somebody else on their shift, if we're talking about a shift lead"

    Every toggle is set per scope, and self is one of the scopes. Proposed scopes:

    1. Self
    2. Volunteers on my shift, not counting peer leads
    3. Peer leads on my shift
    4. My department (VC)
    5. Everyone (Admin)

    So a role's grid is page/ability × scope, still within when/where. Shift Lead examples:

    Ability Self Volunteers on my shift Peer leads
    View review ✕ ✅ ✕
    Edit review ✕ ✅ ✕
    Check in ? ✅ ?
    Remove from shift ✅ (future only) ✅ (during) ✕
    Add notes ? ✅ ?

    Rule for people with several roles: take the best grant they have that fits this subject. Self and peer exclusions always apply, whatever the role. (Admin seeing their own review is still TBD.)

    🤖 Generated with Claude Code

  18. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Scope also includes the subject's role (Chipper, 2026-10-17)

    "for the scope ones, you're forgetting about role"

    Scope has two parts:

    1. Relationship to the person being acted on: self · on my shift · in my department · everyone
    2. Their role(s): any · holds role X · doesn't hold role X

    "Peer leads" isn't a separate scope after all. It's on my shift + holds a Lead role.

    Examples:

    • A Shift Lead can view reviews for people on my shift who don't hold a Lead role.
    • A Lab Host Lead can view profiles for everyone who holds Census Lab Host.
    • A Sampling VC can add notes for everyone holding Census Random Sampler.

    Grid per role: page/ability × scope (relationship + subject role) × when × where. Defaults still reproduce today's behaviour.

    🤖 Generated with Claude Code

  19. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Superseded (2026-10-17): see the v2 role list further down and the design in #804. This table only lists the 50 roles that exist today. Lead positions such as Setup Lead, Strike Lead, Lab Host Lead, Data Entry Shift Lead and Art Tour Lead are not roles yet, so they don't appear here. The design adds them as new area-lead roles.

    Step 1: which roles are permission-setting roles? (Chipper, 2026-10-17)

    "What we need to do first is define which roles are permission setting roles… what are all the different roles we will need to configure in this new setup"

    All 50 op_roles rows on prod, sorted by what they actually are. Holder counts are live; "gates" = how many positions require that role to sign up.

    A. Permission-setting roles — configured in the new module (proposed)

    Role Holders Notes
    Guest — off-playa — pseudo-role: public homepage visitor
    Guest — on-playa (tablet) — pseudo-role: walk-up at the lab
    Authenticated Volunteer — pseudo-role: baseline for anyone signed in
    Shift Lead (92220) 27 gates 15 positions
    Census Sampling Lead (95152) 2 dept lead
    Census Construction Lead (95153) 2 dept lead
    Census Training Lead (95155) 2 dept lead
    Census Data Entry Lead (36985) 2 dept lead
    Census OutReach Lead (95154) 1 dept lead
    Census Gate Sampling Lead (36984) 0 dept lead
    Census Airport Sampling Lead (34863) 0 dept lead
    Volunteer Coordinator — NEW: broad by default (Chipper)
    Admin (2) 30 becomes the core group; trim to ~9
    SuperAdmin (1) 9 merges into Admin ("SuperAdmin isn't a thing")
    Census Lab Host (25407)? 25 ? lab ops on-playa (walk-ups, tablets)
    IT Tech (19962)? 7 ? device provisioning / tablet support
    Core Crew (13184)? 14 ? form audiences (project/item submit); gates 2 positions

    B. Qualification roles — only gate shift sign-up (keep on the position settings, not the module)

    Census Random Sampler (34, gates 1) · Census Random Sampler - Veteran (1) · Census Driver (6, gates 1) · DataBeast Technician (3, gates 1) · Data Entry (18) · Data Entry - Veteran (0) · Setup/Strike (17) · Census Lab Host - Veteran (0) · BxB Sampler (0) · Blog Writer (0) · Data Visualization (0) · Special Project (1) · Training (0)

    C. Attestations / flags — become volunteer flags, not roles

    Signed Behavioral Standards (167) · BurnerProfileUpdated (143) · Data Analysis - Release Signed (4) · WAP_V_override (5) · EmailUnsubscribed (6) · CensusTicket (6) · OtherSAP (37) · Not This Year (0) · Passed online RS-test-out (0) · emergencyContact (0) · campingLocation (0) · NewWAPstartdate (0)

    D. Training completions — become training records (can auto-grant roles)

    TrainingWelcomeComplete (148) · TrainingCensusBasicsComplete (125) · TrainingRandomSamplingComplete (83) · TrainingOutReachComplete (34) · TrainingDataEntryWizComplete (29) · TrainingDataBeastDriverComplete (9)

    E. Camp / team membership — form audiences and position gates, not authority

    Staff (17) · CensusLabCamp (17, gates 1) · CounterCultureCamp (13) · Camping With Census (9)

    F. Account type (#614) — becomes account_type

    TestAccount (4) · OrgAccount (1)

    Questions

    1. Are Lab Host, IT Tech and Core Crew permission-setting roles, or just qualifications/membership?
    2. Do we need all 7 dept-lead roles to be configured separately, or one "Department Lead" with the department as scope? Two of them have no holders.
    3. Staff (17): what does it mean today? Is it authority or membership?
    4. Any role missing, e.g. Data Nerds / Management?

    🤖 Generated with Claude Code

  20. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Per-area lead roles, auto-granted on sign-up, rolled up into a Shift Lead group (Chipper, 2026-10-17)

    "somebody who has signed up as a random sampler shift lead would automatically be assigned the role random sampler shift lead and should technically also be added to the shift lead group, which is used for other things in the system, such as display on their profile"

    • Per-area lead roles (option a): e.g. Random Sampler Shift Lead, Lab Host Lead, Data Entry Lead… Each has its own grid. A sampling lead sees all Random Samplers, Drivers and Traffic Tamers; a Lab Host Lead sees a different set.
    • Acquisition = auto-grant on sign-up: signing up for a Random Sampler Shift Lead position grants the Random Sampler Shift Lead role. This is an event trigger on the role setup page ("how a role is acquired").
    • Role group: Shift Lead becomes a group whose membership comes from the per-area lead roles. Profile display and anything else that says "is a shift lead" reads the group (Roles and permissions foundation #237, item 5).
    • Subject scope can be "holds role X" or "signed up for position/shift type Y" (Traffic Tamer has no role).

    To settle

    1. Qualified vs leading. Today the 15 lead positions are gated by the Shift Lead role. If Shift Lead is now derived from sign-up, what gates who may sign up to lead? Probably a separate qualification ("approved to lead sampling") that admins grant, with the permission role auto-granted on sign-up.
    2. How long does the auto-granted role last? For that shift only, for the event year, or until removed? What happens if they drop the shift?

    🤖 Generated with Claude Code

  21. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Correction (Chipper, 2026-10-17): "shift lead should still work exactly like it works today."

    • Shift Lead stays as it is: granted by admins, gates the lead positions, shown on the profile. It is not derived from anything.
    • The per-area lead roles (e.g. Random Sampler Shift Lead) are added on top. They're auto-granted when someone signs up for that area's lead position, and they carry the area-specific permissions (e.g. see all Random Samplers / Drivers / Traffic Tamers).
    • This answers question 1 above: Shift Lead is the qualification, and the area role is the permission. Question 2, how long the auto-granted area role lasts, is still open.
  22. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Shift sign-up is a permission too (Chipper, 2026-10-17)

    "we need to set permissions on who [signs] up for shifts, whether it's open to people with a role… The shift leads are all set up on their positions by Rescue. So that's admin only gated"

    • Who can sign up for a position belongs in the permissions module, not only in the position's single role_id. Per position (or shift type), three choices:
      • open: any authenticated volunteer
      • requires role(s): today's role_id gate, extended to a set of roles
      • assign-only: no self sign-up; only someone with "add others to this position" can place a person (e.g. lead positions, placed by Rescue)
    • Lead positions today are gated by the Shift Lead role, but in practice an admin assigns them. So they'd be assign-only. The auto-granted area lead role fires on assignment as well as sign-up.
    • "Add others to a shift" is a separate ability with scope. For example, Admin = any position; a VC = maybe their area's non-lead positions.
    • This revises the earlier "qualification roles stay on the position settings" note. The qualification roles still exist, but the rule that uses them moves into the module.

    🤖 Generated with Claude Code

  23. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Permission-granting roles, draft v2 (2026-10-17, after Chipper's corrections)

    1. Pseudo-roles: Guest off-playa · Guest on-playa (tablet) · Authenticated Volunteer (baseline)
    2. Shift Lead (92220, 27 holders). Unchanged: allowed to lead, shown on profile.
    3. Area lead roles: NEW, auto-granted on assignment to that lead position: Gate Sampling Lead · Airport Sampling Lead · Setup Lead · Strike Lead · Data Entry Shift Lead · Lab Host Lead · Art Tour Lead · (trainers? Sampling Lead Trainer, Lab Host Lead Trainer)
    4. Department heads (existing): Census Sampling / Construction / Training / Data Entry / OutReach / Gate Sampling / Airport Sampling Lead
    5. Volunteer Coordinator: NEW, broad
    6. Admin: core group; SuperAdmin merges in
    7. Undecided: Census Lab Host (25) · IT Tech (7) · Core Crew (14) · Staff (17)

    Not permission roles but used as scope/sign-up filters: qualifications (Random Sampler, Driver, DataBeast Tech, Data Entry, Setup/Strike, Veterans…). Flags, training completions, camp/team and account type move out of roles eventually.

    Open:

    🤖 Generated with Claude Code

  24. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Permission catalog, draft v1 (2026-10-17)

    Built from the app's real pages and API routes. V/A/U/D = view / add / update / delete. Each permission is granted per role, with a scope (relationship: self / my shift / my department / everyone + subject role or position filter), a when (event + shift windows), and a where (on/off-playa). Default = today's behaviour.

    1. Shifts & sign-up

    Permission Page Notes
    Shift list: V /shifts Guest off-playa = filtered (#800)
    Shift roster: V /shifts/[id]/volunteers names only vs. full details could be two levels
    Sign up self: A / remove self: D roster + per-position sign-up rule: open / needs role(s) / assign-only
    Add others to a shift: A / remove others: D roster scope by position/area
    Check in / out: U roster self vs. others; check-in window
    Reviews: V / U roster never self, never peer leads
    Shift notes: V / A roster

    2. Shift setup (Admin by default, grantable)

    Permission Page
    Shift types: V/A/U/D /shifts/types
    Positions: V/A/U/D /shifts/positions
    Categories: V/A/U/D /shifts/categories
    Shift times: A/U/D + cancel + reschedule type editor (#731 Part A)
    Event dates: V/A/U/D /dates

    3. Volunteers

    Permission Page
    Volunteer list: V /volunteers
    Profile / info: V/U /volunteers/[id]/info (self vs. others; PII could be its own level)
    Account: V/U /volunteers/[id]/account
    Schedule: V /volunteers/[id]/schedule
    Create account: A /volunteers/account/create
    Volunteer notes: V/A (#744/#767)
    Email preference: U self
    Behavioral Standards attestation: V/U /roles/behavioral-standards/[id]

    4. Roles & permissions (Admin by default)

    Permission Page
    Role definitions: V/A/U/D /roles
    Role members (grant/revoke): V/A/D /roles/[id]/volunteers (scope: which roles you may grant)
    Permissions module: V/U new setup page. Lockout guard: at least one Admin always keeps it

    5. SAPs

    Permission Page
    SAPs: V /saps
    Assign / issue / upload / off-book / notes / email /saps

    6. Ops & system

    Permission Page
    QR codes: V/A/U/D + download /qr-codes
    Reports: V + export /reports
    Printing (labels, shift sheets): V /printing
    Survey reminders: V/A/U/D /census-survey-reminders
    Provision tablets: A/D /provision, /provision-tablet
    Settings: V/U /settings
    Read-only mode toggle · developer mode · mock date /settings
    Send email to a shift's volunteers (#736)

    7. Overrides (bypass a built-in check)

    Double-booking · capacity (shift full) · eligibility (missing role) · outside check-in window · read-only mode

    8. Public / baseline

    Contact form: A · Training pages: V + complete own · Home page: V

    Open

    • Should the roster have two view levels (names only / full details)?
    • Should PII (email, phone, emergency contact) be its own permission, separate from viewing a profile?
    • Anything people do today that isn't on a page (e.g. Discord-only workflows)?

    🤖 Generated with Claude Code

  25. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Decisions (Chipper, 2026-10-17)

    • VC is separate from the department heads. Create one new Volunteer Coordinator role. It is not split by area (sampling vs lab hosting), at least for now.
    • Every role is configurable; no role is special. Any role, existing or added later on the front end, can be opened on the setup page and given anything from no permissions beyond viewing their own info up to a manager-level set.

    What this means for the design: "permission role vs not" is not a code or schema distinction. The setup page lists all roles, and a role with no grants simply has the baseline. The v2 role list above is only the starting seed: which roles get non-empty grids on day one so the app behaves as it does today. The purpose/type field (#472) is a label to help organise the list, not a gate.

    🤖 Generated with Claude Code

  26. mbhewitt commented on Oct 17, 2026

    @mbhewitt
    OwnerAuthor

    Design for review: #804 (consolidates everything in this thread, plus Chipper's 2026-10-17 answers on the role list).

  27. added
    needs: Mew
    on Oct 30, 2026
  28. mbhewitt commented on Nov 27, 2026

    @mbhewitt
    OwnerAuthor

    From Mew's 2026-11-26 roadmap (item 5):

    If the user can edit shifts be able to do it from the shift page in addition to going through the standard process

    This is Part A of this ticket, and Mew wants it in addition to the Shift Types editor, not instead of it. Related: #227 (cancel button), #804 (permissions), #596 B, #432/#466/#533 (bugs in the existing edit path), #730/#620 (log the edits), #843 (on-playa edits).

    Notes from the code

    • Shift Types save is withWriteGuard(shiftTypeUpdate, "superadmin"): only super admins today.
    • No single-time update endpoint exists (pages/api/shifts/types/[typeId]/times/[timeId]/ only has positions/index.ts), so one is needed; both edit paths should share validation.
    • ShiftVolunteers.tsx already knows the canceled state.

    Conflicts to resolve

    Questions for Mew

    1. Who may use it: same as the Shift Types editor (super admins), admins, coordinators, or whoever Design: configurable permissions module (role × permission × scope × when × where) #804 grants "edit shift"?
    2. Which fields: time/date, slots, notes, canceled, role requirement, lead, name/description?
    3. One time only, or "apply to all times of this type"?
    4. If the time changes, must the reschedule emails and penalty waiver always run, or can the editor choose "silent correction"?
    5. Reducing slots below the current signups: block, warn, or allow (see Admin adds can silently exceed a position's slots (Sampling Lead Trainer: 1 slot, 8 filled — intentionally) #782)?
    6. Allowed on past shifts or ones with check-ins?
    7. Allowed on playa? (Settings are hidden there per Pre-playa: scope down risky admin abilities (settings, shift edits, idle-logout, role display) #596 A; offline edits need the sync.)

    Tracking: #849

  29. mbhewitt commented on Nov 27, 2026

    @mbhewitt
    OwnerAuthor

    Mew (2026-11-27, #851 conflict 7): needs more discussion. Open question: does a new Leadership role replace today's Admin (#731 Part C), or does SuperAdmin become App Admin with Admin unchanged on day one (#804)? Don't build either part until this is settled.

  30. mbhewitt commented on Nov 29, 2026

    @mbhewitt
    OwnerAuthor

    Roadmap item 5 (#849) started 2026-11-29. Mew: "If the user can edit shifts be able to do it from the shift page in addition to going through the standard process."

    Questions posted in #census (my default in brackets):

    1. Who: SuperAdmins only, as today? [yes]
    2. What: an "Edit this shift" button on the shift page that opens this one time's editor (date, start/end, notes, canceled, slots per position), plus a link to the full shift-type page. [yes]
    3. Reschedule (Mew, 2026-09-05, Part A comment above): email the people signed up with old → new times and a new ICS; tell them they can drop without penalty; waive the not-checked-in −1 (Volunteer experience scoring is PHP-only and no Shiftboard history is imported — blocks lane suggestions, roster ordering, and ticket/camp decisions in the app #771) for that shift. [yes]
    4. Cancel from the shift page as well, using the existing canceled-shift email. [yes]
    5. Check and fix Shift Types: adding a 2nd time to a shift silently fails to save #466 and Shift-type editor: adding a position silently fails to save (front-end) #533 (editor save bugs) first. [yes]
    6. Part B: show canceled shifts struck through instead of hidden. [yes]
  31. mbhewitt commented on Nov 29, 2026

    @mbhewitt
    OwnerAuthor

    Shipped in PR #901 (prod 2027.G.00901.C, 2026-11-29). Migration 037 applied. Leaving this open for Mew to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: Mew

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions