Only show Duo feature buttons in UI when Duo Features are enabled
What does this MR do and why?
Duo actions can only be taken when the container for the resource (container can be a project or group) has Duo Features enabled via the setting.
Before this MR, we were only blocking AI Actions on the backend (that work was done through !145333 (merged))
With this MR, we are also hiding the frontend buttons for these AI features are also hidden when Duo Features are disabled.
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
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
See below "How to set up and validate locally" for UI changes
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
If desired - run local .spec tests
- In /gitlab folder run
bundle exec rspec ee/spec/lib/gitlab/llm/feature_authorizer_spec.rb
First Validate Existence of AI/Duo Features In your local GDK,
- Go to the Group Level Settings (On Left Menu; Select Group -> Settings -> General)
- Expand 'Permissions and group features'
- Make sure "Use Experiment and Beta Features" is selected/checked ("Use Duo Features" does not need to be selected)
- Click the "Save changes" button.
- Go to an AI Feature (see list here) to make sure it is enabled; Ex: 'Discussion summary' (Go to an Issue in your project and validate "View Summary" button exists)
Next Validate Disabling of AI/Duo Features In your local GDK,
- Go to the Group Level Settings (On Left Menu; Select Group -> Settings -> General)
- Expand 'Permissions and group features'
- Make sure "Use Experiment and Beta Features" is selected/checked. Make sure "Use Duo Features" is not selected, but it's sub-checkbox "Enforce for all subgroups" is selected.
- Click the "Save changes" button.
- Go to an AI Feature (see list here) to make sure it is disabled; Ex: 'Discussion summary' (Go to an Issue in your project and validate "View Summary" button is no longer there)
This description was generated for revision 6225f6a4 using AI