diff options
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) |