Commit 58429386 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fixed error when no OAuth application is associated with GeoNode.

parent 7de8312d
...@@ -35,7 +35,7 @@ class Oauth::GeoAuthController < ActionController::Base ...@@ -35,7 +35,7 @@ class Oauth::GeoAuthController < ActionController::Base
private private
def undefined_oauth_application def undefined_oauth_application
@error = 'There is no OAuth application defined for this Geo node.' @error = 'There are no OAuth application defined for this Geo node. Please ask your administrator to visit "Geo Nodes" on admin screen and click on "Repair authentication".'
render :error, layout: 'errors' render :error, layout: 'errors'
end end
end end
...@@ -46,7 +46,7 @@ module Gitlab ...@@ -46,7 +46,7 @@ module Gitlab
return false unless Gitlab::Geo.secondary? return false unless Gitlab::Geo.secondary?
RequestStore.store[:geo_oauth_application] ||= Gitlab::Geo.current_node.oauth_application or RequestStore.store[:geo_oauth_application] ||= Gitlab::Geo.current_node.oauth_application or
raise GeoOauthApplicationUndefinedError raise OauthApplicationUndefinedError
end end
end 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