mirror of
https://github.com/internetee/registry.git
synced 2025-06-13 16:14:47 +02:00
Fix contact deletion if contact *DeleteProhibited
This commit is contained in:
parent
fad739d279
commit
340e1820f2
4 changed files with 10 additions and 2 deletions
|
@ -19,6 +19,11 @@ module Actions
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if contact.delete_prohibited?
|
||||||
|
contact.errors.add(:status, :delete_prohibited)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
commit
|
commit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,8 @@ class Epp::Contact < Contact
|
||||||
[:code, :epp_id_taken]
|
[:code, :epp_id_taken]
|
||||||
],
|
],
|
||||||
'2305' => [ # Association exists
|
'2305' => [ # Association exists
|
||||||
[:domains, :exist]
|
[:domains, :exist],
|
||||||
|
[:domains, :delete_prohibited],
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,6 +25,8 @@ en:
|
||||||
email_regex_check_error: Invalid format
|
email_regex_check_error: Invalid format
|
||||||
domains:
|
domains:
|
||||||
exist: 'Object association prohibits operation'
|
exist: 'Object association prohibits operation'
|
||||||
|
status:
|
||||||
|
delete_prohibited: Contact delete prohibited by status
|
||||||
statuses:
|
statuses:
|
||||||
not_uniq: 'not uniq'
|
not_uniq: 'not uniq'
|
||||||
country_code:
|
country_code:
|
||||||
|
|
|
@ -115,4 +115,4 @@ class EppContactDeleteBaseTest < EppTestCase
|
||||||
DomainContact.delete_all
|
DomainContact.delete_all
|
||||||
contacts(:john)
|
contacts(:john)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue