Commit 91075c82 authored by digitalMoksha's avatar digitalMoksha

check for `read_only?` first before seeing if request is disallowed

parent cba68d33
...@@ -14,7 +14,7 @@ module Gitlab ...@@ -14,7 +14,7 @@ module Gitlab
@env = env @env = env
@route_hash = nil @route_hash = nil
if disallowed_request? && Gitlab::Database.read_only? if Gitlab::Database.read_only? && disallowed_request?
Rails.logger.debug('GitLab ReadOnly: preventing possible non read-only operation') Rails.logger.debug('GitLab ReadOnly: preventing possible non read-only operation')
error_message = 'You cannot do writing operations on a read-only GitLab instance' error_message = 'You cannot do writing operations on a read-only GitLab instance'
......
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