Commit e2feec1c authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Remove deny disk access feature flag

Introduced in 189342fc, its not clear
why. This feature flag hasn't been used
d505f2a8, which is a year before it got
introduced.
parent 3ba3bf52
---
name: gitaly_deny_disk_access
introduced_by_url:
rollout_issue_url:
milestone:
type: development
group:
default_enabled: false
...@@ -23,7 +23,6 @@ module Gitlab ...@@ -23,7 +23,6 @@ module Gitlab
MUTEX = Mutex.new MUTEX = Mutex.new
DISK_ACCESS_DENIED_FLAG = :deny_disk_access
ALLOW_KEY = :allow_disk_access ALLOW_KEY = :allow_disk_access
# If your code needs this method then your code needs to be fixed. # If your code needs this method then your code needs to be fixed.
...@@ -34,7 +33,7 @@ module Gitlab ...@@ -34,7 +33,7 @@ module Gitlab
def self.disk_access_denied? def self.disk_access_denied?
return false if rugged_enabled? return false if rugged_enabled?
!temporarily_allowed?(ALLOW_KEY) && Feature::Gitaly.enabled?(DISK_ACCESS_DENIED_FLAG) !temporarily_allowed?(ALLOW_KEY)
rescue rescue
false # Err on the side of caution, don't break gitlab for people false # Err on the side of caution, don't break gitlab for people
end end
...@@ -62,7 +61,7 @@ module Gitlab ...@@ -62,7 +61,7 @@ module Gitlab
def legacy_disk_path def legacy_disk_path
if self.class.disk_access_denied? if self.class.disk_access_denied?
raise DirectPathAccessError, "git disk access denied via the gitaly_#{DISK_ACCESS_DENIED_FLAG} feature" raise DirectPathAccessError, "git disk access denied"
end end
@legacy_disk_path @legacy_disk_path
......
...@@ -4,7 +4,7 @@ require_relative 'test_env' ...@@ -4,7 +4,7 @@ require_relative 'test_env'
# This file is specific to specs in spec/lib/gitlab/git/ # This file is specific to specs in spec/lib/gitlab/git/
SEED_STORAGE_PATH = TestEnv.repos_path SEED_STORAGE_PATH = Gitlab::GitalyClient::StorageSettings.allow_disk_access { TestEnv.repos_path }
TEST_REPO_PATH = 'gitlab-git-test.git' TEST_REPO_PATH = 'gitlab-git-test.git'
TEST_NORMAL_REPO_PATH = 'not-bare-repo.git' TEST_NORMAL_REPO_PATH = 'not-bare-repo.git'
TEST_MUTABLE_REPO_PATH = 'mutable-repo.git' TEST_MUTABLE_REPO_PATH = 'mutable-repo.git'
......
...@@ -149,7 +149,9 @@ module TestEnv ...@@ -149,7 +149,9 @@ module TestEnv
end end
end end
FileUtils.mkdir_p(repos_path) FileUtils.mkdir_p(
Gitlab::GitalyClient::StorageSettings.allow_disk_access { TestEnv.repos_path }
)
FileUtils.mkdir_p(SECOND_STORAGE_PATH) FileUtils.mkdir_p(SECOND_STORAGE_PATH)
FileUtils.mkdir_p(backup_path) FileUtils.mkdir_p(backup_path)
FileUtils.mkdir_p(pages_path) FileUtils.mkdir_p(pages_path)
......
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