summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-09 19:11:24 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-09 19:11:24 +0100
commitacd9bc0213098a5626499021eb72595eb556f9be (patch)
tree5492c07f5e8f5695fd8c43120bda79a9e7286fdf /app/controllers
parent3eb7ea49feaf9341b2eec6eb0c58ae2f0aa37864 (diff)
downloadgitlab-ce-acd9bc0213098a5626499021eb72595eb556f9be.tar.gz
Acquire lock before LDAP sync
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index fb74919ea23..bc8019193ee 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -246,6 +246,8 @@ class ApplicationController < ActionController::Base
def ldap_security_check
if current_user && current_user.requires_ldap_check?
+ return unless Gitlab::LDAP::Access.try_lock_user(user)
+
unless Gitlab::LDAP::Access.allowed?(current_user)
sign_out current_user
flash[:alert] = "Access denied for your LDAP account."