diff options
Diffstat (limited to 'app/models/project_ci_cd_setting.rb')
-rw-r--r-- | app/models/project_ci_cd_setting.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/project_ci_cd_setting.rb b/app/models/project_ci_cd_setting.rb index a495d34c07c..b26a3025b61 100644 --- a/app/models/project_ci_cd_setting.rb +++ b/app/models/project_ci_cd_setting.rb @@ -18,6 +18,8 @@ class ProjectCiCdSetting < ApplicationRecord }, allow_nil: true + default_value_for :forward_deployment_enabled, true + def self.available? @available ||= ActiveRecord::Migrator.current_version >= MINIMUM_SCHEMA_VERSION @@ -28,6 +30,10 @@ class ProjectCiCdSetting < ApplicationRecord super end + def forward_deployment_enabled? + super && ::Feature.enabled?(:forward_deployment_enabled, project) + end + private def set_default_git_depth |