Merge pull request #1865 from internetee/fix-uuid-ident-parsing

Registrant User: Fix eIDAS UUID ident parsing
This commit is contained in:
Timo Võhmar 2021-02-26 14:10:34 +02:00 committed by GitHub
commit 24427d7234
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@ class RegistrantUser < User
delegate :can?, :cannot?, to: :ability
def ident
registrant_ident.to_s.split('-').last
registrant_ident.to_s[3..]
end
def country
@ -18,6 +18,8 @@ class RegistrantUser < User
end
def companies(company_register = CompanyRegister::Client.new)
return [] if ident.include?('-')
company_register.representation_rights(citizen_personal_code: ident,
citizen_country_code: country.alpha3)
end