Skip to content

Only show Duo feature buttons in UI when Duo Features are enabled

Lindsey Shelton requested to merge add-user-to-feature-authorizor into master

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.

️ Note: You must be using Gitlab EE to validate the following.

If desired - run local .spec tests

  1. 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,

  1. Go to the Group Level Settings (On Left Menu; Select Group -> Settings -> General)
  2. Expand 'Permissions and group features'
  3. Make sure "Use Experiment and Beta Features" is selected/checked ("Use Duo Features" does not need to be selected) Screenshot_2024-04-22_at_3.30.56_PM
  4. Click the "Save changes" button.
  5. 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) Screenshot_2024-04-22_at_3.24.26_PM

Next Validate Disabling of AI/Duo Features In your local GDK,

  1. Go to the Group Level Settings (On Left Menu; Select Group -> Settings -> General)
  2. Expand 'Permissions and group features'
  3. 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. Screenshot_2024-04-22_at_2.14.24_PM
  4. Click the "Save changes" button.
  5. 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) Screenshot_2024-04-22_at_3.37.54_PM

This description was generated for revision 6225f6a4 using AI

Edited by Jessie Young

Merge request reports