diff options
author | James Lopez <james@jameslopez.es> | 2017-12-07 17:13:40 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-12-07 17:13:40 +0100 |
commit | 7af56500a1e1b6437a2fa27988a5f11a4eb54391 (patch) | |
tree | dea1b829568675ba69cb0d61e635625c6395345f /lib/gitlab/git_access.rb | |
parent | a898714c7f73e7f7e788d2e9ff51f275a44414ae (diff) | |
download | gitlab-ce-7af56500a1e1b6437a2fa27988a5f11a4eb54391.tar.gz |
refactor code to match EE changes
Diffstat (limited to 'lib/gitlab/git_access.rb')
-rw-r--r-- | lib/gitlab/git_access.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index 8998c4b1a83..9d7d921bb9c 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -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 |