diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-07-24 14:53:30 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-07-24 19:13:48 +0200 |
commit | 0698c1f4d0152036a395031e29f03efe179408fa (patch) | |
tree | deb4a85b46f170878d13cb8da4a086fd6126bf85 | |
parent | d3f5e78bf22444c5fc1d7af253473fa5478a86c8 (diff) | |
download | gitlab-ce-bvl-fix-login-issue-with-ldap-enabled.tar.gz |
Load the sessionscontroller after loading the ldap strategiesbvl-fix-login-issue-with-ldap-enabled
-rw-r--r-- | config/initializers/omniauth.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb index f7fa6d1c2de..90d79bae466 100644 --- a/config/initializers/omniauth.rb +++ b/config/initializers/omniauth.rb @@ -9,6 +9,13 @@ if Gitlab::LDAP::Config.enabled? server = Gitlab.config.ldap.servers.values.first alias_method server['provider_name'], :ldap end + + # We need to make sure we require the sessions controller _after_ we defined the + # nescessary LDAP-strategy classes. + # + # If we don't then the token gets cleared out at some point. + # + require Rails.root.join('app', 'controllers', 'sessions_controller') end OmniAuth.config.full_host = Settings.gitlab['base_url'] |