Commit f8475f73 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

do ldap access check only if current_user defined

parent 99efbc8c
......@@ -162,7 +162,7 @@ class ApplicationController < ActionController::Base
end
def ldap_security_check
if current_user.ldap_user? && current_user.requires_ldap_check?
if current_user && current_user.ldap_user? && current_user.requires_ldap_check?
Gitlab::LDAP::Access.new.update_permissions(current_user)
current_user.last_credential_check_at = Time.now
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment