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

View file

@ -25,6 +25,8 @@ en:
email_regex_check_error: Invalid format
domains:
exist: 'Object association prohibits operation'
status:
delete_prohibited: Contact delete prohibited by status
statuses:
not_uniq: 'not uniq'
country_code: