Add ldap callback definitions to initializer

parent c8616728
......@@ -32,10 +32,6 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
end
Gitlab.config.ldap.servers.each do |server|
alias_method server.provider_name, :ldap
end
def omniauth_error
@provider = params[:provider]
@error = params[:error]
......
......@@ -4,3 +4,9 @@ module OmniAuth::Strategies
const_set(server.provider_class, Class.new(LDAP))
end
end
OmniauthCallbacksController.class_eval do
Gitlab.config.ldap.servers.each do |server|
alias_method server.provider_name, :ldap
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