Skip to content

Hide ai_features scope when ai features are not available

What does this MR do and why?

Follow up from !131034 (merged)

ai_features token scope was introduced to allow usage of Ai features with a less powerful scope than API. But it is not always applicable, since ai features need to be enabled in the instance and need to be part of the license. Creation of ai_features token is possible for users that have at least one group with ai features enabled, and for projects and groups that have ai_features enabled.

How to set up and validate locally

Follow these instructions on how to create groups with access to ai_features: https://docs.gitlab.com/ee/development/ai_features/index.html#implement-a-new-ai-action

  1. Go to your user Prefences > Access Token > Add New Token
  2. For a user without access to a group with ai features enabled, when creating a personal token the option for ai_features is unavailable
  3. For a user with access to a group with ai features enabled, ai_features is available

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #423325 (closed)

Edited by Eduardo Bonet

Merge request reports

Loading