Fix flows for DAP self-hosted

What does this MR do and why?

  • Fixes Duo group-level settings not showing for DAP self-hosted users (necessary for configuring flows)
  • Allows auto code review for DAP self-hosted users (flows feature)

Context:

An RFH was opened when a DAP self-hosted customer flagged that they were blocked from using foundational flows. It was discovered that the group-level GitLab Duo settings section was missing entirely from the Settings > General page due to a missing check for the :self_hosted_dap add-on. This prevented users from being able to configure flows for their groups. After further investigation, similar missing checks were also found to be excluding DAP self-hosted users from seeing the DAP auto code review setting.

References

RFH: https://gitlab.com/gitlab-com/request-for-help/-/work_items/4433

Screenshots or screen recordings

Group-level settings page

Before After
Screenshot_2026-03-24_at_9.43.34_pm Screenshot_2026-03-24_at_9.42.22_pm

Auto code reviews setting

Before After
Screenshot_2026-03-24_at_10.16.01_pm Screenshot_2026-03-24_at_10.13.29_pm

How to set up and validate locally

Pre-requisites:

An active Ultimate offline license.

  1. Start GDK in self-managed mode GITLAB_SIMULATE_SAAS=0 gdk start
  2. Run the Duo setup rake task GITLAB_SIMULATE_SAAS=0 bundle exec 'rake gitlab:duo:setup[self_hosted_dap]' to seed instance with DAP self-hosted data. This will also seed a Duo enabled group called gitlab-duo for testing.

Validating group-level settings page

  1. Navigate to the group settings page Group > Settings > General, i.e http://gdk.test:3000/groups/gitlab-duo/-/edit and validate there exists a GitLab Duo features section, similar to the after screenshot.
  2. Validate you are able to enable flows from the settings page and use them, e.g by testing the Developer flow following these instructions

Validating auto-code review

  1. Navigate to the group settings page Group > Settings > General, i.e http://gdk.test:3000/groups/gitlab-duo/-/edit
  2. Find the Merge requests section and ensure the Enable automatic reviews by GitLab Duo checkbox is present

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 Julie Huang

Merge request reports

Loading