Skip to content

fix(members): invite with every chosen role, not just the first - #817

Merged
kipavy merged 1 commit into
devfrom
fix/invite-multi-role
Nov 8, 2026
Merged

kipavy merged 1 commit into
devfrom
fix/invite-multi-role

Conversation

@kipavy

@kipavy kipavy commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #779. Needs VoltiusApp/server#126 on the server.

The invite panel lets you tick several roles (custom ones too), but only the first role's name reached the server. A pending invitee joined with that one role, and an invite whose first pick was a custom role failed.

Change

  • addMemberById and inviteByEmail send role_ids. They're passed from the invite panel, the Buy-seats retry and the pending card's Resend.
  • role still carries one builtin role, chosen by the new invitationRoleName: the first builtin role ticked, otherwise the least-privileged builtin. A server without role_ids support grants exactly what it did before.
  • The pending-invite card shows one RoleChip per invited role, sorted by position and wrapping like member rows. If the server didn't send role_ids, it shows the single chip as before.
  • Below Business the invite panel no longer offers custom roles. The server refuses them with 402, and the panel would have shown that as "seat limit reached".

Screenshots (desktop, forced phone shell, invite panel): https://claude.ai/artifact/HMXqgvCKUjorW3MX1FUymZ

Tests

  • Service bodies carry role_ids. inviteUserWithRoles sends every chosen id and names the first builtin role. With only custom roles chosen, role is the least-privileged builtin.
  • Panel: the email invite and Buy-seats keep every ticked role. Custom roles are hidden when the team is locked.
  • Card: it lists every role and Resend keeps them.
  • Chunks run: src/services + src/stores + src/plugins (5066), src/components/members + settings + vault-share (476). tsc is clean.

Known gap, not in this PR: undoing a member removal (teamOffboarding) re-adds each member with one role only.

The invite panel lets several roles be ticked, but only the first one's
name was sent, so a pending invitee joined with one role, and a custom
role picked first made the invite fail.

Invites now send role_ids with every chosen role (panel, buy-seats
retry and Resend). `role` still carries one builtin role, the first
builtin chosen or the least-privileged one, so a server without
role_ids grants exactly what it did before. The pending-invite card
shows a chip per invited role. Below Business the panel no longer
offers custom roles: the server refuses them with 402, which the panel
would report as a full seat count.

Fixes #779
@kipavy
kipavy merged commit bde4899 into dev Nov 8, 2026
5 checks passed
@kipavy
kipavy deleted the fix/invite-multi-role branch November 8, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant