diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-06-14 11:18:25 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-14 11:18:25 +0000 |
commit | 5cf5680f9c8ce251570efce7dd4c348fb68efccf (patch) | |
tree | 511e1b3da7b9426dd4b09ca1cdd2ba01d5b419b4 /lib/gitlab | |
parent | 434efdacd66e974a93cb2e94eee725a4a4d16f9f (diff) | |
download | gitlab-ce-5cf5680f9c8ce251570efce7dd4c348fb68efccf.tar.gz |
Deny repository disk access in development and test
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/gitaly_client.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/gitlab/gitaly_client.rb b/lib/gitlab/gitaly_client.rb index 36e9adf27da..620362b52a9 100644 --- a/lib/gitlab/gitaly_client.rb +++ b/lib/gitlab/gitaly_client.rb @@ -33,11 +33,6 @@ module Gitlab MAXIMUM_GITALY_CALLS = 35 CLIENT_NAME = (Sidekiq.server? ? 'gitlab-sidekiq' : 'gitlab-web').freeze - # We have a mechanism to let GitLab automatically opt in to all Gitaly - # features. We want to be able to exclude some features from automatic - # opt-in. That is what EXPLICIT_OPT_IN_REQUIRED is for. - EXPLICIT_OPT_IN_REQUIRED = [Gitlab::GitalyClient::StorageSettings::DISK_ACCESS_DENIED_FLAG].freeze - MUTEX = Mutex.new class << self @@ -249,7 +244,7 @@ module Gitlab when MigrationStatus::OPT_OUT true when MigrationStatus::OPT_IN - opt_into_all_features? && !EXPLICIT_OPT_IN_REQUIRED.include?(feature_name) + opt_into_all_features? && !explicit_opt_in_required.include?(feature_name) else false end @@ -259,6 +254,13 @@ module Gitlab false end + # We have a mechanism to let GitLab automatically opt in to all Gitaly + # features. We want to be able to exclude some features from automatic + # opt-in. This function has an override in EE. + def self.explicit_opt_in_required + [] + end + # opt_into_all_features? returns true when the current environment # is one in which we opt into features automatically def self.opt_into_all_features? |