mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-26 21:16:06 +10:00
Conflicts: app/views/help/index.html.haml lib/gitlab/git_access.rb public/500.html public/502.html
21 lines
579 B
Ruby
21 lines
579 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
|
|
|
|
OmniAuth.config.allowed_request_methods = [:post]
|
|
OmniAuth.config.before_request_phase do |env|
|
|
OmniAuth::RequestForgeryProtection.new(env).call
|
|
end
|