From 0eb26ae8ec0983a2e9a08b1b074794ad1ef67a87 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 6 Jul 2017 09:08:49 -0400 Subject: [PATCH] only use LDAP when enabled --- app/controllers/sessions_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 75bdbea0..812f45ad 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -19,6 +19,10 @@ class SessionsController < ApplicationController skip_before_filter :verify_authenticity_token def new + # If LDAP is enabled, just route to it instead. + if Rails.application.config.omniauth_ldap + redirect_to "#{relative_root}/auth/ldap" + end end def create