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
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/auth/ldap/user.rb')
-rw-r--r--lib/gitlab/auth/ldap/user.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/auth/ldap/user.rb b/lib/gitlab/auth/ldap/user.rb
index 56c2af1910e..957ec5fa479 100644
--- a/lib/gitlab/auth/ldap/user.rb
+++ b/lib/gitlab/auth/ldap/user.rb
@@ -31,7 +31,11 @@ module Gitlab
end
def valid_sign_in?
- allowed? && super
+ # The order is important here: we need to ensure the
+ # associated GitLab user entry is valid and persisted in the
+ # database. Otherwise, the LDAP access check will fail since
+ # the user doesn't have an associated LDAP identity.
+ super && allowed?
end
def ldap_config