mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 06:56:23 +02:00
added contact publisher
This commit is contained in:
parent
84aa93e97b
commit
7f41c5c26d
3 changed files with 5 additions and 3 deletions
|
@ -51,6 +51,8 @@ module Api
|
|||
|
||||
reparsed_request = reparsed_request(request.body.string)
|
||||
|
||||
p '-----'
|
||||
|
||||
disclosed_attributes = reparsed_request[:disclosed_attributes]
|
||||
|
||||
render_disclosed_attributes_error and return if disclosed_attributes.present? && contact.org? &&
|
||||
|
|
|
@ -65,7 +65,7 @@ class Contact < ApplicationRecord
|
|||
validate :validate_html
|
||||
validate :validate_country_code, if: -> { self.class.address_processing? }
|
||||
validates :registrant_publishable, inclusion: { in: [true, false] }, if: -> { registrant? }
|
||||
# validates :registrant_publishable, inclusion: { in: [false] }, unless: -> { registrant? }
|
||||
validates :registrant_publishable, inclusion: { in: [false] }, unless: -> { registrant? }
|
||||
|
||||
after_initialize do
|
||||
self.status_notes = {} if status_notes.nil?
|
||||
|
|
|
@ -80,7 +80,6 @@ class WhoisRecord < ApplicationRecord
|
|||
h[:dnssec_keys] = domain.dnskeys.map { |key| "#{key.flags} #{key.protocol} #{key.alg} #{key.public_key}" }
|
||||
h[:dnssec_changed] = domain.dnskeys.pluck(:updated_at).max.try(:to_s, :iso8601) rescue nil
|
||||
|
||||
|
||||
h
|
||||
end
|
||||
|
||||
|
@ -116,6 +115,7 @@ class WhoisRecord < ApplicationRecord
|
|||
email: contact.email,
|
||||
changed: contact.updated_at.try(:to_s, :iso8601),
|
||||
disclosed_attributes: contact.disclosed_attributes,
|
||||
contact_publishable: contact.registrant_publishable?,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue