Fix contact deletion if contact *DeleteProhibited

This commit is contained in:
Alex Sherman 2021-02-15 14:51:01 +05:00
parent fad739d279
commit 340e1820f2
4 changed files with 10 additions and 2 deletions

View file

@ -19,6 +19,11 @@ module Actions
return
end
if contact.delete_prohibited?
contact.errors.add(:status, :delete_prohibited)
return
end
commit
end

View file

@ -83,7 +83,8 @@ class Epp::Contact < Contact
[:code, :epp_id_taken]
],
'2305' => [ # Association exists
[:domains, :exist]
[:domains, :exist],
[:domains, :delete_prohibited],
]
}
end