Repository navigation
fix(members): invite with every chosen role, not just the first - #817
Merged
Merged
Conversation
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
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.
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
addMemberByIdandinviteByEmailsendrole_ids. They're passed from the invite panel, the Buy-seats retry and the pending card's Resend.rolestill carries one builtin role, chosen by the newinvitationRoleName: the first builtin role ticked, otherwise the least-privileged builtin. A server withoutrole_idssupport grants exactly what it did before.RoleChipper invited role, sorted by position and wrapping like member rows. If the server didn't sendrole_ids, it shows the single chip as before.Screenshots (desktop, forced phone shell, invite panel): https://claude.ai/artifact/HMXqgvCKUjorW3MX1FUymZ
Tests
role_ids.inviteUserWithRolessends every chosen id and names the first builtin role. With only custom roles chosen,roleis the least-privileged builtin.src/services+src/stores+src/plugins(5066),src/components/members+settings+vault-share(476).tscis clean.Known gap, not in this PR: undoing a member removal (
teamOffboarding) re-adds each member with one role only.