Story #104525314 - EPP user must respect serverDeleteProhibited

This commit is contained in:
Matt Farnsworth 2015-11-09 18:59:04 +02:00
parent 1722e00e8c
commit 8a14bf05f8

View file

@ -776,12 +776,12 @@ class Epp::Domain < Domain
### ABILITIES ###
# depricated -- this is redundant TODO: try to remove
def can_be_deleted?
begin
errors.add(:base, :domain_status_prohibits_operation)
return false
end if statuses.include?(DomainStatus::CLIENT_DELETE_PROHIBITED)
end if (statuses & [DomainStatus::CLIENT_DELETE_PROHIBITED, DomainStatus::SERVER_DELETE_PROHIBITED].any?
true
end