Send null memberRoleId instead of undefined
What does this MR do and why?
- Currently, if a user is assigned a member role, changing their role back to a default role, such as
Maintainerreturns an error. - This is because, when we are changing the role back, we are not sending a
nullvalue formemberRoleId. This MR fixes that.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
| Before | After |
|---|---|
| Screen_Recording_2024-09-18_at_5.10.35_PM | Screen_Recording_2024-09-18_at_5.08.40_PM |
How to set up and validate locally
- Make sure you have the
Ultimatelicense, and you have SaaS mode enabled. - Pick a group that you are an owner of, and create a member role:
MemberRole.create(base_access_level: 10, read_code: true, namespace: <GROUP>)
- Navigate to
Manage > Membersand invite a user with this custom role. - Then, try to change the role back to a default role such as
Maintainer.
Related to #443369 (closed)
Edited by Hinam Mehra