mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Remove ID card logic from codebase
This commit is contained in:
parent
04f0ef9a93
commit
11ee1f9f1e
11 changed files with 3 additions and 162 deletions
|
@ -47,12 +47,6 @@ class ApiUser < User
|
|||
self.active = true unless saved_change_to_active?
|
||||
end
|
||||
|
||||
class << self
|
||||
def find_by_id_card(id_card)
|
||||
find_by(identity_code: id_card.personal_code)
|
||||
end
|
||||
end
|
||||
|
||||
def to_s
|
||||
username
|
||||
end
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
class IdCard
|
||||
attr_accessor :first_name
|
||||
attr_accessor :last_name
|
||||
attr_accessor :personal_code
|
||||
attr_accessor :country_code
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
class RegistrantUser < User
|
||||
attr_accessor :idc_data
|
||||
|
||||
devise :trackable, :timeoutable, :id_card_authenticatable
|
||||
devise :trackable, :timeoutable
|
||||
|
||||
def ability
|
||||
@ability ||= Ability.new(self)
|
||||
|
@ -74,7 +74,7 @@ class RegistrantUser < User
|
|||
last_name = omniauth_hash.dig('info', 'last_name')
|
||||
|
||||
user_data = { first_name: first_name, last_name: last_name,
|
||||
ident: identity_code, country_code: country_code }
|
||||
ident: identity_code, country_code: country_code }
|
||||
|
||||
find_or_create_by_user_data(user_data)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue