Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-02-26 14:27:27 +0300
committerRémy Coutable <remy@rymai.me>2016-02-26 14:27:27 +0300
commitbb3563b5cd063772fa16c934404e7912d9f3d726 (patch)
tree29494d63dabb5ff9d72cb32fc0229636b4bc7b46 /app
parent3f83d1dc3a6af8854747d695847c75ba41d25cb0 (diff)
parentb95ef77e233eab3b3d37a4a7dce545d9da36f8a0 (diff)
Merge branch 'rs-crowd-form-view-spec' into 'master'
Move "I should see Crowd login form" feature to a view spec We were doing all kinds of code gymnastics to "enable" Crowd in the feature spec and this would sometimes cause a transient failure. Really what it's testing is if the Crowd login form shows when Crowd's enabled, so this is much better suited to a view spec. See merge request !2963
Diffstat (limited to 'app')
-rw-r--r--app/helpers/auth_helper.rb4
-rw-r--r--app/views/devise/sessions/new.html.haml4
2 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb
index de669e529a7..b4f80fd9b3e 100644
--- a/app/helpers/auth_helper.rb
+++ b/app/helpers/auth_helper.rb
@@ -6,6 +6,10 @@ module AuthHelper
Gitlab.config.ldap.enabled
end
+ def omniauth_enabled?
+ Gitlab.config.omniauth.enabled
+ end
+
def provider_has_icon?(name)
PROVIDERS_WITH_ICONS.include?(name.to_s)
end
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index 1136afbf29c..d65fa60025c 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -4,7 +4,7 @@
= render 'devise/shared/signin_box'
-# Omniauth fits between signin/ldap signin and signup and does not have a surrounding box
- - if Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?
+ - if omniauth_enabled? && devise_mapping.omniauthable?
.clearfix.prepend-top-20
= render 'devise/shared/omniauth_box'
@@ -14,6 +14,6 @@
= render 'devise/shared/signup_box'
-# Show a message if none of the mechanisms above are enabled
- - if !signin_enabled? && !ldap_enabled? && !(Gitlab.config.omniauth.enabled && devise_mapping.omniauthable?)
+ - if !signin_enabled? && !ldap_enabled? && !(omniauth_enabled? && devise_mapping.omniauthable?)
%div
No authentication methods configured.