Commit 576412e4 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fixed a situation where Geo.readonly? could incorrectly lock you down

parent e05f19d7
...@@ -21,7 +21,7 @@ module Gitlab ...@@ -21,7 +21,7 @@ module Gitlab
end end
def self.readonly? def self.readonly?
RequestStore.store[:geo_node_readonly] ||= self.enabled? && !self.current_node.primary? RequestStore.store[:geo_node_readonly] ||= self.enabled? && self.current_node && !self.current_node.primary?
end end
def self.geo_node?(host:, port:) def self.geo_node?(host:, port:)
......
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