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:
- summarize merge request
- summarize code review
- generate issue description
Other details
- As part of this work, the
user_can_send_to_aimethod 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: trueexperimantal_features_enabled: true- Seat assigned in Duo Enterprise add on
For beta features:
duo_features_enabled: trueexperimantal_features_enabled: true- Seat assigned in Duo Enterprise add on
For GA Features:
duo_features_enabled: trueexperimantal_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: trueexperimantal_features_enabled: true-
ai_featureslicensed
For beta features:
duo_features_enabled: trueexperimantal_features_enabled: true-
ai_featureslicensed
For GA Features:
duo_features_enabled: trueexperimantal_features_enabled: true OR false-
ai_featureslicensed
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_featureslicensed 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_featureslicensed 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_featureslicensed duo_features_enabled: true
For GA Features:
-
ai_featureslicensed - 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.