mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 02:35:57 +02:00
Dnskey removing
This commit is contained in:
parent
c8863df4c5
commit
4b76e2ceec
4 changed files with 85 additions and 9 deletions
|
@ -51,6 +51,7 @@ class Epp::EppDomain < Domain
|
|||
detach_contacts(self.class.parse_contacts_from_frame(parsed_frame))
|
||||
detach_nameservers(self.class.parse_nameservers_from_frame(parsed_frame))
|
||||
detach_statuses(self.class.parse_statuses_from_frame(parsed_frame))
|
||||
detach_dnskeys(self.class.parse_dnskeys_from_frame(parsed_frame))
|
||||
|
||||
errors.empty?
|
||||
end
|
||||
|
@ -173,6 +174,20 @@ class Epp::EppDomain < Domain
|
|||
end
|
||||
end
|
||||
|
||||
def detach_dnskeys(dnskey_list)
|
||||
to_delete = []
|
||||
dnskey_list.each do |x|
|
||||
dnskey = dnskeys.where(public_key: x[:public_key])
|
||||
if dnskey.blank?
|
||||
add_epp_error('2303', 'pubKey', x[:public_key], [:dnskeys, :not_found])
|
||||
else
|
||||
to_delete << dnskey
|
||||
end
|
||||
end
|
||||
|
||||
dnskeys.delete(to_delete)
|
||||
end
|
||||
|
||||
### RENEW ###
|
||||
|
||||
def renew(cur_exp_date, period, unit = 'y')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue