diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-07-30 11:50:50 +0400 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-08-06 20:03:01 +0400 |
commit | 669682686ea32a787aa9ef950388f780cfc00146 (patch) | |
tree | 586fcdc44534f1aee34ce9432cf1d8fa6d620feb /app/controllers/omniauth_callbacks_controller.rb | |
parent | 68a9203bcef1e44bdf72acf4cc8d4977eec79b7a (diff) |
Move LDAP timeout code to Gitlab::LDAP::Access
Diffstat (limited to 'app/controllers/omniauth_callbacks_controller.rb')
-rw-r--r-- | app/controllers/omniauth_callbacks_controller.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index ef2afec52dc..3ed6a69c2d8 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -21,13 +21,12 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController @user = Gitlab::LDAP::User.find_or_create(oauth) @user.remember_me = true if @user.persisted? - gitlab_ldap_access do |access| - if access.allowed?(@user) - sign_in_and_redirect(@user) - else - flash[:alert] = "Access denied for your LDAP account." - redirect_to new_user_session_path - end + # Do additional LDAP checks for the user filter and EE features + if Gitlab::LDAP::Access.allowed?(@user) + sign_in_and_redirect(@user) + else + flash[:alert] = "Access denied for your LDAP account." + redirect_to new_user_session_path end end |