diff options
author | Jacob Vosmaer (GitLab) <jacob@gitlab.com> | 2018-06-01 14:56:29 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-06-01 14:56:29 +0300 |
commit | edb9db37ede4aff12f06338e4fd8f30039cc8183 (patch) | |
tree | 460bbcce4dd97fea12de3dd609345912636eadb9 /config/initializers/6_validations.rb | |
parent | cc5890f287b9dc5c117470d5b0925ba7f6d07485 (diff) |
Add "deny disk access" Gitaly feature (tripswitch)
Diffstat (limited to 'config/initializers/6_validations.rb')
-rw-r--r-- | config/initializers/6_validations.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/config/initializers/6_validations.rb b/config/initializers/6_validations.rb index 89aabe530fe..362a23164ab 100644 --- a/config/initializers/6_validations.rb +++ b/config/initializers/6_validations.rb @@ -38,10 +38,12 @@ def validate_storages_config end def validate_storages_paths - Gitlab.config.repositories.storages.each do |name, repository_storage| - parent_name, _parent_path = find_parent_path(name, repository_storage.legacy_disk_path) - if parent_name - storage_validation_error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages") + Gitlab::GitalyClient::StorageSettings.allow_disk_access do + Gitlab.config.repositories.storages.each do |name, repository_storage| + parent_name, _parent_path = find_parent_path(name, repository_storage.legacy_disk_path) + if parent_name + storage_validation_error("#{name} is a nested path of #{parent_name}. Nested paths are not supported for repository storages") + end end end end |