diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-14 06:08:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-14 06:08:51 +0300 |
commit | 962711501ff8e5a004c700b97a367930ed5a1f20 (patch) | |
tree | 8be5b4d4de0cd0bdd5c61be727d67d1171c865d1 /lib/gitlab/auth | |
parent | 13d294a8d8be05421e7d5e34577033ba5b34059c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r-- | lib/gitlab/auth/ldap/user.rb | 6 |
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 |