diff options
author | Nick Thomas <nick@gitlab.com> | 2016-11-15 15:02:44 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2016-11-16 14:30:56 +0000 |
commit | 1c994dbc05c147714479288126742f3fee158fd8 (patch) | |
tree | a100d59b32ec3a0b7323d7f958a246c668bc5286 /app/models/repository.rb | |
parent | 689786975afac6f56e66f77f01f1b1565a021930 (diff) | |
download | gitlab-ce-1c994dbc05c147714479288126742f3fee158fd8.tar.gz |
Fix POST /internal/allowed to cope with gitlab-shell v4.0.0 project paths
gitlab-shell v3.6.6 would give project paths like so:
* namespace/project
gitlab-shell v4.0.0 can give project paths like so:
* /namespace1/namespace2/project
* /namespace/project
* /path/to/repository/storage/namespace1/namespace2/project
* /path/to/repository/storage/namespace/project
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 4282197faa5..57acd279a02 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -15,16 +15,6 @@ class Repository Gitlab.config.repositories.storages end - def self.remove_storage_from_path(repo_path) - storages.find do |_, storage_path| - if repo_path.start_with?(storage_path) - return repo_path.sub(storage_path, '') - end - end - - repo_path - end - def initialize(path_with_namespace, project) @path_with_namespace = path_with_namespace @project = project |