diff options
author | Jan-Willem van der Meer <mail@jewilmeer.nl> | 2014-10-14 15:11:53 +0400 |
---|---|---|
committer | Jan-Willem van der Meer <mail@jewilmeer.nl> | 2014-10-14 15:13:59 +0400 |
commit | 6ce65a3e950532e8fb65cf188eb5df9a6eddfb39 (patch) | |
tree | ace2949d72914b88506691910b940588db0f2e81 /app | |
parent | 9bf7bfda20a466b375a459b95068de8c0139fc9a (diff) |
Use Hash syntax for LDAP server declaration
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/sessions_controller.rb | 2 | ||||
-rw-r--r-- | app/views/devise/sessions/new.html.haml | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index e918f46bb3e..5ced98152a5 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -19,7 +19,7 @@ class SessionsController < Devise::SessionsController end if Gitlab.config.ldap.enabled - @ldap_servers = Gitlab.config.ldap.servers + @ldap_servers = Gitlab::LDAP::Config.servers end super diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 04e998f8be4..b9832787446 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -6,13 +6,13 @@ %ul.nav.nav-tabs - @ldap_servers.each_with_index do |server, i| %li{class: (:active if i==0)} - = link_to server['label'], "#tab-#{server.provider_name}", 'data-toggle' => 'tab' + = link_to server['label'], "#tab-#{server['provider_name']}", 'data-toggle' => 'tab' %li = link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab' .tab-content - @ldap_servers.each_with_index do |server,i| - %div.tab-pane{id: "tab-#{server.provider_name}", class: (:active if i==0)} - = render 'devise/sessions/new_ldap', provider: server.provider_name + %div.tab-pane{id: "tab-#{server['provider_name']}", class: (:active if i==0)} + = render 'devise/sessions/new_ldap', provider: server['provider_name'] %div#tab-signin.tab-pane = render 'devise/sessions/new_base' |