Commit 989d3148 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'fix/push-read-only-message-ce' into 'master'

[CE] Fix message when pushing to Geo secondary

See merge request gitlab-org/gitlab-ce!15793
parents 980ea20c 7af56500
......@@ -166,7 +166,7 @@ module Gitlab
end
if Gitlab::Database.read_only?
raise UnauthorizedError, ERROR_MESSAGES[:cannot_push_to_read_only]
raise UnauthorizedError, push_to_read_only_message
end
if deploy_key
......@@ -280,5 +280,9 @@ module Gitlab
UserAccess.new(user, project: project)
end
end
def push_to_read_only_message
ERROR_MESSAGES[:cannot_push_to_read_only]
end
end
end
......@@ -19,10 +19,14 @@ module Gitlab
end
if Gitlab::Database.read_only?
raise UnauthorizedError, ERROR_MESSAGES[:read_only]
raise UnauthorizedError, push_to_read_only_message
end
true
end
def push_to_read_only_message
ERROR_MESSAGES[:read_only]
end
end
end
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