mirror of
https://github.com/internetee/registry.git
synced 2025-07-01 16:53:37 +02:00
parent
c1875ec88e
commit
787cca8e4c
9 changed files with 134 additions and 46 deletions
|
@ -51,11 +51,6 @@ class ApiUser < User
|
|||
|
||||
find_by(identity_code: identity_code)
|
||||
end
|
||||
|
||||
def all_by_identity_code(identity_code)
|
||||
ApiUser.where(identity_code: identity_code)
|
||||
.where("identity_code is NOT NULL and identity_code != ''").includes(:registrar)
|
||||
end
|
||||
end
|
||||
|
||||
def registrar_typeahead
|
||||
|
@ -93,4 +88,10 @@ class ApiUser < User
|
|||
md5 = OpenSSL::Digest::MD5.new(cert.to_der).to_s
|
||||
certificates.api.exists?(md5: md5, common_name: cn)
|
||||
end
|
||||
|
||||
def linked_users
|
||||
self.class.where(identity_code: identity_code)
|
||||
.where("identity_code is NOT NULL and identity_code != ''")
|
||||
.where.not(id: id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue