mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 23:56:09 +10:00
16 lines
427 B
Ruby
16 lines
427 B
Ruby
if Gitlab::LDAP::Config.enabled?
|
|
module OmniAuth::Strategies
|
|
Gitlab::LDAP::Config.servers.each do |server|
|
|
# do not redeclare LDAP
|
|
next if server['provider_name'] == 'ldap'
|
|
const_set(server['provider_class'], Class.new(LDAP))
|
|
end
|
|
end
|
|
|
|
OmniauthCallbacksController.class_eval do
|
|
Gitlab::LDAP::Config.servers.each do |server|
|
|
alias_method server['provider_name'], :ldap
|
|
end
|
|
end
|
|
end
|