Repository navigation
Exclusions as roles: NoLogin, DoNotContact, hidden shift types/positions (#848) - #893
Merged
Merged
Conversation
Mew 2026-11-29: exclusions are plain roles, no new table. - migration 031: NoLogin, NoCamping, NoTicketHelp, DoNotContact roles; hidden_role_id on op_shift_name and op_position_type - NoLogin: refused at Okta + passcode sign-in; a live session gets 401 on its next request (readSessionFromRequest), dust hop too - hidden_role_id: whoever holds the role doesn't see the shift type / position (list, detail, eligibility) and can't be added (hard blocker, admins included); earlier signups show (excluded) to admins - DoNotContact: the mail queue drops them from every email, by account or address, not only callers that pass recipientShiftboardId - "Hidden from role" on the shift type and position forms Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <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.
Roadmap item 13. Refs #848. Built to Mew's 2026-11-29 answers: exclusions are plain roles, not a new table ("handled with roles to avoid creating another thing"). Only admins see someone's roles.
Migration 031
NoLogin(2000040),NoCamping(2000041),NoTicketHelp(2000042),DoNotContact(2000043). Admins assign them like any other role.hidden_role_idtoop_shift_nameandop_position_type. Anyone holding that role doesn't see the shift type or position. It's the reverse ofop_position_type.role_id.Enforcement
readSessionFromRequest, so every authed API call is covered. The dust hop checks separately.checkShiftAddgets a newexcludedhard blocker. Admins can't override it; the fix is to lift the role.enqueueEmaildrops the person fromto/ccon every email, whether the sender gave their account or only their address. Before this, the unsubscribe check only ran when the sender passedrecipientShiftboardId. Unsubscribe behavior itself is unchanged.UI
Tests
e2e/tests/38-exclusions.spec.tscovers the hidden position (list, detail, self-add and admin-add blocked, roster flag), DoNotContact (no email queued), and NoLogin (a live session gets 401).🤖 Generated with Claude Code