Merge branch 'fix-500-login-disabled' into 'master'

Fix 500 error on login page if ldap enabled and sign-in disabled

Related to gitlab/gitlabhq#1701

See merge request !1209
This commit is contained in:
Marin Jankovski 2014-10-22 12:42:41 +00:00
commit 5e2a1c14eb

View file

@ -2,22 +2,22 @@
.login-heading
%h3 Sign in
.login-body
- if ldap_enabled? && gitlab_config.signin_enabled
- if ldap_enabled?
%ul.nav.nav-tabs
- @ldap_servers.each_with_index do |server, i|
%li{class: (:active if i==0)}
%li{class: (:active if i.zero?)}
= link_to server['label'], "#tab-#{server['provider_name']}", 'data-toggle' => 'tab'
%li
= link_to 'Standard', '#tab-signin', 'data-toggle' => 'tab'
- if gitlab_config.signin_enabled
%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)}
- @ldap_servers.each_with_index do |server, i|
%div.tab-pane{id: "tab-#{server['provider_name']}", class: (:active if i.zero?)}
= render 'devise/sessions/new_ldap', provider: server['provider_name']
%div#tab-signin.tab-pane
= render 'devise/sessions/new_base'
- if gitlab_config.signin_enabled
%div#tab-signin.tab-pane
= render 'devise/sessions/new_base'
- elsif ldap_enabled?
= render 'devise/sessions/new_ldap', ldap_servers: @ldap_servers
- elsif gitlab_config.signin_enabled
= render 'devise/sessions/new_base'
- else