Skip to content

Resolve various visibility level settings issues

What does this MR do?

  • Fix new sub-group shouldn't be allowed to have with higher visibility than its parent.
  • Fix edit group cannot set visibility lower than its sub-groups
  • Fix restricted visibility levels are disabled on new group form
  • Fix disabled style for invalid visibility options (no pointer cursor, icon should be lighter color)
  • Fix disabled radio buttons can not be "default"
  • Fix correct visibility level options shown on new group form (disabled if invalid)
  • Fix correct visibility level options shown on new project form (disabled if invalid)
  • Fix visibility level options dynamically enabled/disabled when namespace is changed

Are there points in the code the reviewer needs to double check?

Ensure the visibility selector behaves as expected on "new group", "new project", and "new snippet" forms as well as in the admin settings page (default visibility selector).

The "new project" page should enable/disable visibility options (with proper explanatory text) when different namespaces are selected in the form.

Why was this MR needed?

  • Some visibility options that should be invalid were not (e.g. sub-group higher visibility than parent)
  • Some invalid visibility options that should be disabled are visible on "new group" or "new project" forms even though they throw errors.
  • Visibility options do not have good explanations when they are disabled.

Screenshots (if relevant)

Group forms

new group form edit group form
new-group edit-group

Project form

extra-descriptive-text

Dynamically updated options in new project form

dynamic-visibility-level-sm

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #31273 (closed)

Edited by username-removed-636429

Merge request reports

Loading