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

This commit is contained in:
digitalMoksha 2017-11-21 13:30:54 +01:00
parent cba68d338b
commit 91075c8237
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ module Gitlab
@env = env
@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')
error_message = 'You cannot do writing operations on a read-only GitLab instance'