Resolve various visibility level settings issues
requested to merge 31273-creating-an-project-within-an-internal-sub-group-gives-the-option-to-set-it-a-public into master
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 |
---|---|
Project form
Dynamically updated options in new project form
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary [ ] Documentation created/updated[ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
- Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend [ ] Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #31273 (closed)
Edited by username-removed-636429