[Ban AI] Add backend for cascading setting `duo_features_enabled`
Context
As of %16.9, we have a backend setting called duo_features_enabled
for projects via this MR. Right now, if duo_features_enabled
is false
for a project, then the project cannot use code suggestions. We will expand this setting to apply to groups as well and apply then apply the setting to all AI features (Code Suggestions, Chat, etc).
Implement cascading settings for groups using the GitLab Cascading Settings framework. The framework applies to groups only so we must extend it to apply to projects/project settings as well. A proof of concept for how this can be done is available on this branch.
- Use the cascading settings framework
- Proof of concept that does this is in this branch.
Definition of done
- New cascading setting called
duo_features_enabled
that defaults totrue
- Because this setting is being created using the cascading settings framework, it should be available on both the
namespace_settings
table and theapplication_settings
table - The cascading settings framework supports
application_settings
andnamespace_settings
but we also want it to apply to the existing attribute on theproject_settings
table. This will require new/custom code. There is an example of this code inapp/models/concerns/cascading_project_setting_attribute.rb
in the proof of concept branch here.