[go: up one dir, main page]

Skip to content

[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.

Definition of done

  • New cascading setting called duo_features_enabled that defaults to true
  • Because this setting is being created using the cascading settings framework, it should be available on both the namespace_settings table and the application_settings table
  • The cascading settings framework supports application_settings and namespace_settings but we also want it to apply to the existing attribute on the project_settings table. This will require new/custom code. There is an example of this code in app/models/concerns/cascading_project_setting_attribute.rb in the proof of concept branch here.