mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 09:46:09 +02:00
Merge branch 'story/117991277-ident-cc' into staging
This commit is contained in:
commit
7fab4009f0
1 changed files with 7 additions and 1 deletions
|
@ -82,7 +82,7 @@ class Contact < ActiveRecord::Base
|
|||
|
||||
ORG = 'org'
|
||||
PRIV = 'priv'
|
||||
BIRTHDAY = 'birthday'
|
||||
BIRTHDAY = 'birthday'.freeze
|
||||
PASSPORT = 'passport'
|
||||
|
||||
IDENT_TYPES = [
|
||||
|
@ -257,6 +257,8 @@ class Contact < ActiveRecord::Base
|
|||
if ident.size != 8 || !(ident =~/\A[0-9]{8}\z/)
|
||||
errors.add(:ident, err_msg)
|
||||
end
|
||||
when BIRTHDAY
|
||||
errors.add(:ident, err_msg)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -289,6 +291,10 @@ class Contact < ActiveRecord::Base
|
|||
!org?
|
||||
end
|
||||
|
||||
def birthday?
|
||||
ident_type == BIRTHDAY
|
||||
end
|
||||
|
||||
def generate_auth_info
|
||||
return if @generate_auth_info_disabled
|
||||
return if auth_info.present?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue