diff options
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index fd02db86582..6a29de20d86 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -996,6 +996,10 @@ class User < ApplicationRecord @ldap_identity ||= identities.find_by(["provider LIKE ?", "ldap%"]) end + def matches_identity?(provider, extern_uid) + identities.where(provider: provider, extern_uid: extern_uid).exists? + end + def project_deploy_keys DeployKey.in_projects(authorized_projects.select(:id)).distinct(:id) end |