Repository navigation
feat(members): offer the analyst role on invite and role change - #2549
Merged
Merged
Maple Review Bot / Maple / review
succeeded
Nov 13, 2026 in 1m 21s
Confidence 10/10 · No issues found
🟢 Confidence 10/10 · safe to merge. Analyst joins the one list every picker reads, and the invite default stays org:member; the earlier memberEntry position note is untouched.
1 note · tests covered · risk medium
Adds the analyst role to Policy.assignableRoles, so the Members page's invite, row and confirm-strip pickers offer it, and unknown role keys now read as analyst. roleOf is unchanged in behavior because the merged list is the same lookup. Safe to merge once the role exists in Clerk.
assignableRolesgains anorg:analystentry first, replacing the privateclerkRoleslist- Unknown Clerk role keys now display as Analyst instead of Member
memberEntrymoves toassignableRoles[1]since member is no longer first
Before merge
- Manual · Create
org:analyst(name "Analyst", no system permissions, in the default role set) on the production auth instance before this deploys - Manual · Confirm production Clerk has no role keys other than admin, member and engineer: any other key now shows as Analyst
Still open from earlier reviews
- 🔵 Note · F1 ·
memberEntryis looked up by array position, not by role ·apps/web/src/page/settings/kit/org-membership.ts:11
What was checked
- Invite select still initialises and resets to
org:member(update.ts:259,:543), so the new first entry is not the default - Only four files differ from the base;
roleOfreads the same entry set as before (roles.ts:61) - Row role select is dropped after a successful change (
update.ts:641), so analyst rows re-read the new index
6a35f17 · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading