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 Maintainer returns an error.
  • This is because, when we are changing the role back, we are not sending a null value for memberRoleId. 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

  1. Make sure you have the Ultimate license, and you have SaaS mode enabled.
  2. 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>)
  1. Navigate to Manage > Members and invite a user with this custom role.
  2. Then, try to change the role back to a default role such as Maintainer.

Related to #443369 (closed)

Edited by Hinam Mehra

Merge request reports

Loading