Experimental and Beta GitLab Duo features not updated after cut-off date

Title: Experimental GitLab Duo features not updated after cut-off date

Description: Experimental features of GitLab Duo were not updated after the cut-off date to require an add-on seat assigned. This results in buttons being visible in the UI but users not actually having access to those features.

We need to:

  • Update policies and other places in the codebase to check for proper licensing of these features
  • Hide or disable UI elements for experimental Duo features if the user does not have the required add-on license

Description was generated using AI

Features I confirm this behaviour for:

  1. summarize merge request
  2. summarize code review
  3. generate issue description

Other details

  • As part of this work, the user_can_send_to_ai method has weird logic and should either be removed or updated.

Logic:

For GA, Experimental and Beta features (after free access period), there are several conditions they need to accommodate:

For experiment features:

  • duo_features_enabled: true
  • experimantal_features_enabled: true
  • Seat assigned in Duo Enterprise add on

For beta features:

  • duo_features_enabled: true
  • experimantal_features_enabled: true
  • Seat assigned in Duo Enterprise add on

For GA Features:

  • duo_features_enabled: true
  • experimantal_features_enabled: true OR false
  • Seat assigned in Duo Enterprise (or Pro) add on

In case of free period:

For experiment features:

  • duo_features_enabled: true
  • experimantal_features_enabled: true
  • ai_features licensed

For beta features:

  • duo_features_enabled: true
  • experimantal_features_enabled: true
  • ai_features licensed

For GA Features:

  • duo_features_enabled: true
  • experimantal_features_enabled: true OR false
  • ai_features licensed

Outdated information:

For experiment features, we should be checking if the user belongs to at least one group where all of the following is true:

  • ai_features licensed
  • duo_features_enabled: true
  • experiment and beta features are enabled

For GA Features, we should be checking if the user belongs to at least one group where all of the following is true:

  • ai_features licensed
  • duo_features_enabled: true

OR, if free access was cut off for the GA feature, their group memberships do not matter and all we care about is if the user as a Duo license.

The user_can_send_to_ai method instead is checking:

For experiment features:

  • ai_features licensed
  • duo_features_enabled: true

For GA Features:

  • ai_features licensed
  • if any of the groups they belong to have Feature.enabled?(:duo_chat_requires_licensed_seat), in which case it checks if the user has a Duo license.
Edited by Gosia Ksionek