Skip to content

Resets visibility level when namespace is changed

What does this MR do?

This MR resets visibility level back to the strictest option of "Private" when a different namespace is changed. This is to resolve the issue of a disabled radio option being selected:

🐛 Before After (this MR)
incorrect-visibility-selected solved-radio-option

Follow up MR

Ideally, we can make this a bit smarter -- whereby if the previously selected visibility level is allowed, it will not reset. And it will only reset (to the default "Private") if the previously selected visibility level is a disabled option. But we can improve on this iteratively in a follow up issue > #331620 😁

Optionally, we could also set it to null (no option selected) when namespace is changed 🤔. I'll include this in the follow-up issue, just in case we want to consider this option.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

Does this MR contain changes to processing or storing of credentials or tokens, authorization and authentication methods or other items described in the security review guidelines? If not, then delete this Security section.

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Samantha Ming

Merge request reports

Loading