Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 12:08:52 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-17 12:08:52 +0300
commit53ae6b7e3f83591ad251a3f771f5bf3b8cf087ba (patch)
tree5180b96d6a84f36a515cedfa8e81d72de5ccf4fb /app/models/project_ci_cd_setting.rb
parentcfe63cce6a90a1c70397c1b9f6d90480f25cae0a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/project_ci_cd_setting.rb')
-rw-r--r--app/models/project_ci_cd_setting.rb6
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