Skip to content

Resolve "Unable to fork project or create project if application wide lock_duo_features_enabled is true"

What does this MR do and why?

Fix for issue: #567332 (closed)

The check project_setting.duo_features_enabled_locked_by_ancestor? only checks the immediate ancestor, that is the project's group for to understand where duo_features_enabled is locked. It does not check the application setting's value.

However, before project_setting is updated, it is necessary to check both the group's duo_features_enabled_locked? value AND the application setting's duo_features_enabled_locked value to evaluate if either is true

Thankfully, cascading attribute framework combines both checks into one, with duo_features_enabled_locked?, so we can use this method to solve the issue at hand. Source

Steps to reproduce

  1. Run GDK in self-managed mode, with a Duo license.
  2. In Admin>GitLab Duo>Change configuration set GitLab Duo availability to Always off
  3. Visit /api/v4/application/settings and check lock_duo_features_enabled: true
  4. Create a project and fork it

Before the fix: Project is half created with no repository

After the fix: Project is successfully created

References

Screenshots or screen recordings

Before After
Screenshot_2025-09-16_at_6.03.09_PM Screenshot_2025-09-16_at_6.06.48_PM

How to set up and validate locally

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 Manoj M J

Merge request reports

Loading