Enable custom role on member invites (group and project member pages)
What does this MR do and why?
Display custom roles in the invite member modal present in the group and project member pages.
This is the current component organization:
graph TD;
InviteMembersModal-->CE[CE InviteModalBase];
InviteMembersModal-->EE[EE InviteModalBase];
EE[EE InviteModalBase]-->CE[CE InviteModalBase];
InviteGroupsModal-->CE[CE InviteModalBase];
InviteGroupsModal-->EE[EE InviteModalBase];
InviteMemberModal
continues to provide the standard GitLab roles to the CE InviteModalBase
. On the other hand, EE InviteModalBase
fetches the custom roles and combines them with the standard GitLab roles. CE InviteModalBase
has a couple of functions (dynamically imported depending of EE/CE) that allows it to operate with both types of roles.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- Go to a group or project member page, for example
/groups/flightjs/-/group_members
or/flightjs/Flight/-/project_members
, and play changing the role for members. Everything should work normally. - Enable
Ultimate
tier for the group using:/admin/groups/flightjs/edit
- Create a custom role using:
/groups/flightjs/-/settings/roles_and_permissions
- Try to assign the custom role from step #3 (closed) to a member. It should work.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Eduardo Sanz García