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:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-03-05 15:02:36 +0300
committerBob Van Landuyt <bob@vanlanduyt.co>2018-03-28 15:12:08 +0300
commitce69419a60a04b78616e7fe7d26ed7ed936e7c62 (patch)
treecc210e78443643944e46ba11511f8254c9016d22 /lib/gitlab/git_access.rb
parent7ea08566f36d97e1cf2b31767ebb122883f4f30e (diff)
Remove permanent redirects
Removes permanent redirects, this means that redirects will only be possible as long as the old route isn't taken by a new project/group.
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r--lib/gitlab/git_access.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 6400089a22f..0a2a23e835b 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -53,7 +53,7 @@ module Gitlab
ensure_project_on_push!(cmd, changes)
check_project_accessibility!
- check_project_moved!
+ add_project_moved_message!
check_repository_existence!
case cmd
@@ -125,16 +125,12 @@ module Gitlab
end
end
- def check_project_moved!
+ def add_project_moved_message!
return if redirected_path.nil?
project_moved = Checks::ProjectMoved.new(project, user, protocol, redirected_path)
- if project_moved.permanent_redirect?
- project_moved.add_message
- else
- raise ProjectMovedError, project_moved.message(rejected: true)
- end
+ project_moved.add_message
end
def check_command_disabled!(cmd)