mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
Story#105747240 - remove legal documents from domain history
This commit is contained in:
parent
a6027ac7d6
commit
b05ce36ea3
2 changed files with 9 additions and 8 deletions
|
@ -439,6 +439,10 @@ class Epp::Domain < Domain
|
|||
at.deep_merge!(attrs_from(frame.css('chg'), current_user, 'chg'))
|
||||
at.deep_merge!(attrs_from(frame.css('rem'), current_user, 'rem'))
|
||||
|
||||
if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame))
|
||||
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
|
||||
end
|
||||
|
||||
at_add = attrs_from(frame.css('add'), current_user)
|
||||
at[:nameservers_attributes] += at_add[:nameservers_attributes]
|
||||
|
||||
|
@ -503,7 +507,7 @@ class Epp::Domain < Domain
|
|||
def attach_legal_document(legal_document_data)
|
||||
return unless legal_document_data
|
||||
|
||||
legal_documents.build(
|
||||
legal_documents.create(
|
||||
document_type: legal_document_data[:type],
|
||||
body: legal_document_data[:body]
|
||||
)
|
||||
|
@ -512,6 +516,10 @@ class Epp::Domain < Domain
|
|||
def epp_destroy(frame, user_id)
|
||||
return false unless valid?
|
||||
|
||||
if doc = attach_legal_document(Epp::Domain.parse_legal_document_from_frame(frame))
|
||||
frame.css("legalDocument").first.content = doc.path if doc && doc.persisted?
|
||||
end
|
||||
|
||||
if Setting.request_confirmation_on_domain_deletion_enabled &&
|
||||
frame.css('delete').children.css('delete').attr('verified').to_s.downcase != 'yes'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue