Add DAP self-hosted model DAP check in user_authorizable

What does this MR do and why?

Fixes a bug that occurs in version 18.8 affecting DAP with self-hosted models on an online license with Duo Enterprise add-on by introducing an explicit self-hosted DAP feature setting check in allowed_to_use. This resembles the check added in 18.9.

For more context on why the bug occurs and why this fixes it, see: https://gitlab.com/gitlab-org/gitlab/-/issues/588101#note_3126775713+

References

https://gitlab.com/gitlab-org/gitlab/-/work_items/588101+

Screenshots or screen recordings

Notes Recording
Online license, Duo Enterprise + self-hosted models beta settings enabled
  • When self-hosted models are set to DAP feature settings, feature setting split is respected.

Online license, no Duo Enterprise add-on
  • No regressions: DAP feature setting split respected for GitLab-managed models

Offline license, no DAP Self-Hosted add-on
  • Cannot access agentic chat and DAP features (ex: automate tab)
Offline license, DAP Self-Hosted add-on
  • DAP feature setting split respected
  • No access when no model is previously selected/feature setting is disabled

How to set up and validate locally

Prerequisites:

  • Offline and online Ultimate/Premium license

  • Start GDK on SM mode: GITLAB_SIMULATE_SAAS=0 gdk start

  • To get the correct add-ons:

    • Duo Enterprise: GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup'
    • Duo Pro: GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup["duo_pro"]'
    • Find license here.
  • Select self-hosted models in /admin/gitlab_duo/self_hosted and follow screen recording above for each case.

MR acceptance checklist

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

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
  • The MR that fixed the bug on the default branch has been deployed to GitLab.com (not applicable for documentation or spec changes).
  • The MR title is descriptive (e.g. "Backport of 'title of default branch MR'"). This is important, since the title will be copied to the patch blog post.
  • Required labels have been applied to this merge request
  • This MR has been approved by a maintainer (only one approval is required).
  • Ensure the e2e:test-on-omnibus-ee job has succeeded, or if it has failed, investigate the failures. If you determine the failures are unrelated, you may proceed. If you need assistance investigating, reach out to a Software Engineer in Test in #s_developer_experience.

Note to the merge request author and maintainer

If you have questions about the patch release process, please:

Edited by Cindy Halim

Merge request reports

Loading