diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-08 15:09:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-08 15:09:53 +0300 |
commit | 148b75b329294f6b6ae409bbf8d70590e63c6bc9 (patch) | |
tree | 30918a97e353067ff9c99e04fb7e296305d130b7 /app/models/identity.rb | |
parent | 707742e59ca57d1f2ea00d65fa35a7b9a5ded398 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/identity.rb')
-rw-r--r-- | app/models/identity.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/identity.rb b/app/models/identity.rb index 40d9f856abf..fc97c68b756 100644 --- a/app/models/identity.rb +++ b/app/models/identity.rb @@ -18,6 +18,9 @@ class Identity < ApplicationRecord scope :with_extern_uid, ->(provider, extern_uid) do iwhere(extern_uid: normalize_uid(provider, extern_uid)).with_provider(provider) end + scope :with_any_extern_uid, ->(provider) do + where.not(extern_uid: nil).with_provider(provider) + end def ldap? Gitlab::Auth::OAuth::Provider.ldap_provider?(provider) |