Enable DAP access for free-tier namespaces
What does this MR do and why?
Enables Duo Agent Platform (DAP) access for free-tier SaaS namespaces that have an active gitlab_credits add-on.
This is the backend foundation for the feature. It introduces:
- A
dap_free_tier_gitlab_creditsfeature flag (default: disabled) to safely roll out access -
Namespace#has_active_gitlab_credits_add_on?checks for an activegitlab_creditspurchase, gated behind the flag -
licensed_ai_features_available?onGroupandProject, extended to return true forgitlab_creditsnamespaces on SaaS - StageCheck, llows credits-eligible DAP features to bypass the license check for
gitlab_creditsnamespaces -
Ai::Catalog#duo_agent_platform_enabled_for_user?falls back to a credits-based check when the user has no Premium+ group -
UserPreference#duo_default_namespace_candidates— includesgitlab_creditspurchases alongsideduo_corefor namespace selection
MR series
This change cannot be fully tested in isolation. End-to-end behaviour is only visible once all parts are merged.
-
!226462 (merged) - Backend core access gate
⬅️ you are here - !226470 (merged) - Gating, policies, and catalog finder
- !226475 (merged) - Frontend and settings helpers
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
This MR can't be tested in isolation, a full working PoC is available in this MR
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Fred de Gier