Restrict reassign options to enterprise users
What does this MR do and why?
To prevent incorrect reassignment, we should restrict the options available for reassignment for groups with existing enterprise users to only other enterprise users.
This MR adds that functionality, whilst still listing all users for groups which are not using enterprise users.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
- Setup your GDK for enterprise functionality
- Upgrade a group to Ultimate by going to Admin -> Groups -> Edit -> Plan and selecting Ultimate
- Import a group with user contributions into the group
- Go to
http://gdk.test:3000/groups/<ultimate-group>/-/group_members?tab=placeholders&subtab=awaiting(replace<ultimate-group>with your group) - Select a user for a placeholder, ensure it only lists enterprise users, and that the reassignment still works.
- Repeat for a non-ultimate group, and an ultimate group without enterprise users and make sure all users are shown.
- Attempt a CSV upload with a member who is not in the enterprise group, and verify that the expected error is included in the failures CSV (Check letter opener for the email)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #510673 (closed)
Edited by Keeyan Nejad