Commit 8c64bd7e authored by Alexander Turinske's avatar Alexander Turinske

Default on policies feature flag

- :security_orchestration_policies_configuration is defaulted
  on

Changelog: changed
EE: true
parent 70c11f8a
...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/321258 ...@@ -5,4 +5,4 @@ rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/321258
milestone: '13.9' milestone: '13.9'
type: development type: development
group: group::container security group: group::container security
default_enabled: false default_enabled: true
...@@ -9,7 +9,7 @@ module Projects ...@@ -9,7 +9,7 @@ module Projects
before_action :validate_policy_configuration, only: :edit before_action :validate_policy_configuration, only: :edit
before_action do before_action do
push_frontend_feature_flag(:security_orchestration_policies_configuration, project) push_frontend_feature_flag(:security_orchestration_policies_configuration, project, default_enabled: :yaml)
check_feature_flag! check_feature_flag!
end end
...@@ -91,7 +91,7 @@ module Projects ...@@ -91,7 +91,7 @@ module Projects
end end
def check_feature_flag! def check_feature_flag!
render_404 if Feature.disabled?(:security_orchestration_policies_configuration, project) render_404 if Feature.disabled?(:security_orchestration_policies_configuration, project, default_enabled: :yaml)
end end
end end
end end
......
...@@ -7,7 +7,7 @@ module Projects ...@@ -7,7 +7,7 @@ module Projects
before_action :authorize_read_threat_monitoring! before_action :authorize_read_threat_monitoring!
before_action do before_action do
push_frontend_feature_flag(:security_orchestration_policies_configuration, @project) push_frontend_feature_flag(:security_orchestration_policies_configuration, @project, default_enabled: :yaml)
end end
feature_category :not_owned feature_category :not_owned
......
...@@ -40,7 +40,7 @@ module Mutations ...@@ -40,7 +40,7 @@ module Mutations
end end
def allowed?(project) def allowed?(project)
Feature.enabled?(:security_orchestration_policies_configuration, project) Feature.enabled?(:security_orchestration_policies_configuration, project, default_enabled: :yaml)
end end
def assign_project(project, policy_project) def assign_project(project, policy_project)
......
...@@ -43,7 +43,7 @@ module Mutations ...@@ -43,7 +43,7 @@ module Mutations
private private
def allowed?(project) def allowed?(project)
Feature.enabled?(:security_orchestration_policies_configuration, project) Feature.enabled?(:security_orchestration_policies_configuration, project, default_enabled: :yaml)
end end
def commit_policy(project, policy_yaml, operation_mode) def commit_policy(project, policy_yaml, operation_mode)
......
...@@ -34,7 +34,7 @@ module Mutations ...@@ -34,7 +34,7 @@ module Mutations
private private
def allowed?(project) def allowed?(project)
Feature.enabled?(:security_orchestration_policies_configuration, project) Feature.enabled?(:security_orchestration_policies_configuration, project, default_enabled: :yaml)
end end
def create_project(project) def create_project(project)
......
...@@ -46,7 +46,7 @@ module Security ...@@ -46,7 +46,7 @@ module Security
end end
def enabled? def enabled?
::Feature.enabled?(:security_orchestration_policies_configuration, project) ::Feature.enabled?(:security_orchestration_policies_configuration, project, default_enabled: :yaml)
end end
def policy_hash def policy_hash
......
...@@ -65,7 +65,7 @@ module EE ...@@ -65,7 +65,7 @@ module EE
return unless security_policy_target_project_id.present? return unless security_policy_target_project_id.present?
if (security_policy_target_project = ::Project.find(security_policy_target_project_id)) if (security_policy_target_project = ::Project.find(security_policy_target_project_id))
return unless ::Feature.enabled?(:security_orchestration_policies_configuration, security_policy_target_project) return unless ::Feature.enabled?(:security_orchestration_policies_configuration, security_policy_target_project, default_enabled: :yaml)
::Security::Orchestration::AssignService ::Security::Orchestration::AssignService
.new(security_policy_target_project, current_user, policy_project_id: project.id) .new(security_policy_target_project, current_user, policy_project_id: project.id)
......
...@@ -143,7 +143,7 @@ module EE ...@@ -143,7 +143,7 @@ module EE
end end
def scan_policies_menu_item def scan_policies_menu_item
if ::Feature.disabled?(:security_orchestration_policies_configuration, context.project) || if ::Feature.disabled?(:security_orchestration_policies_configuration, context.project, default_enabled: :yaml) ||
!can?(context.current_user, :security_orchestration_policies, context.project) !can?(context.current_user, :security_orchestration_policies, context.project)
return ::Sidebars::NilMenuItem.new(item_id: :scan_policies) return ::Sidebars::NilMenuItem.new(item_id: :scan_policies)
end end
......
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