Skip to content

refactor: prepare ProjectDisabledPolicy for dynamic default value

Description

This MR is first of roughly three that will implement the Add a setting to enforce "duoFeaturesEnabled" c... (#1425 - closed)

This MR prepares the ProjectDisabledPolicy to have a dynamic default value. In other words, before this, if we fail to contact the GitLab API, we use false as the default isDisabled value => the duo features are on-by-default.

This MR keeps this logic but we introduce a new function (#isDisabledByDefault()) that provides the false. The #isDisabledByDefault() will be loading its result from the settings.json in the following MRs.

Related Issues

Part of #1425 (closed)

How has this been tested?

The logic is unit-tested.

Screenshots (if appropriate)

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes

Merge request reports