Make cascading attribute helpers more generic to support project setting
What does this MR do and why?
This change makes the helpers for cascading attributes more generic so that they can be also used for project cascading attributes.
Project cascading attributes are implemented in a module CascadingProjectSettingAttribute
which is very similar to CascadingNamespaceSettingAttribute
.
Changes in this MR:
- Move the helpers from
NamespacesHelper
to a newCascadingSettingsHelper
- Move HAML partials and JS one layer up so that it's not scoped under namespaces
- Documentation changes
There will be a new cascading project setting introduced as part of #469439 (comment 2093505539) and making these helpers more generic allows us to add this cascading UI toggle in a cleaner way.
EDIT: It turns out that this planned MR is not necessary for the planned project setting because it was decided to move it to a different section, and that particular section was using Vue form. But maybe it could still be useful in the future for forms that use Rails helpers
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
No visual changes. The only setting currently using these helpers is for duo_features_enabled
.
Duo features | Locked with tooltip |
---|---|
How to set up and validate locally
- Visit any group General Settings -> Permissions and group features
- Verify that toggle for GitLab Duo features still works
Related to #469439 (closed)