fix(users): populate roles[] with primary role on user creation
All user-creation paths (admin create, bulk invite import, public application contact + team members, project team members, jury-group + special-award invites) now set roles=[role] so the invariant role in roles[] holds for new users, matching seed.ts and the role-change mutations. Prevents the empty roles[] inconsistency that hid primary-role mentors from the mentor picker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -697,6 +697,7 @@ export const specialAwardRouter = router({
|
||||
email: invitee.email,
|
||||
name: invitee.name || null,
|
||||
role: 'JURY_MEMBER',
|
||||
roles: ['JURY_MEMBER'],
|
||||
status: 'INVITED',
|
||||
inviteToken,
|
||||
inviteTokenExpiresAt: new Date(Date.now() + expiryMs),
|
||||
|
||||
Reference in New Issue
Block a user