Commit ba1bf117 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'pedropombeiro/353890/use-default_enabled-yaml' into 'master'

Use default_enabled: :yaml for feature flag check

See merge request gitlab-org/gitlab!82837
parents c4ca69b0 c010f514
...@@ -81,7 +81,7 @@ class GroupPolicy < Namespaces::GroupProjectNamespaceSharedPolicy ...@@ -81,7 +81,7 @@ class GroupPolicy < Namespaces::GroupProjectNamespaceSharedPolicy
condition(:crm_enabled, score: 0, scope: :subject) { Feature.enabled?(:customer_relations, @subject) && @subject.crm_enabled? } condition(:crm_enabled, score: 0, scope: :subject) { Feature.enabled?(:customer_relations, @subject) && @subject.crm_enabled? }
condition(:group_runner_registration_allowed) do condition(:group_runner_registration_allowed) do
Feature.disabled?(:runner_registration_control) || Gitlab::CurrentSettings.valid_runner_registrars.include?('group') Feature.disabled?(:runner_registration_control, default_enabled: :yaml) || Gitlab::CurrentSettings.valid_runner_registrars.include?('group')
end end
rule { can?(:read_group) & design_management_enabled }.policy do rule { can?(:read_group) & design_management_enabled }.policy do
......
...@@ -195,7 +195,7 @@ class ProjectPolicy < BasePolicy ...@@ -195,7 +195,7 @@ class ProjectPolicy < BasePolicy
end end
condition(:project_runner_registration_allowed) do condition(:project_runner_registration_allowed) do
Feature.disabled?(:runner_registration_control) || Gitlab::CurrentSettings.valid_runner_registrars.include?('project') Feature.disabled?(:runner_registration_control, default_enabled: :yaml) || Gitlab::CurrentSettings.valid_runner_registrars.include?('project')
end end
# `:read_project` may be prevented in EE, but `:read_project_for_iids` should # `:read_project` may be prevented in EE, but `:read_project_for_iids` should
......
...@@ -47,7 +47,7 @@ module Ci ...@@ -47,7 +47,7 @@ module Ci
end end
def runner_registrar_valid?(type) def runner_registrar_valid?(type)
Feature.disabled?(:runner_registration_control) || Gitlab::CurrentSettings.valid_runner_registrars.include?(type) Feature.disabled?(:runner_registration_control, default_enabled: :yaml) || Gitlab::CurrentSettings.valid_runner_registrars.include?(type)
end end
def token_scope def token_scope
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
.settings-content .settings-content
= render 'registry' = render 'registry'
- if Feature.enabled?(:runner_registration_control) - if Feature.enabled?(:runner_registration_control, default_enabled: :yaml)
%section.settings.as-runner.no-animate#js-runner-settings{ class: ('expanded' if expanded_by_default?) } %section.settings.as-runner.no-animate#js-runner-settings{ class: ('expanded' if expanded_by_default?) }
.settings-header .settings-header
%h4 %h4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment