Merge pull request #76 from internetee/111237776-updateProhibited-renew

111237776 update prohibited renew
This commit is contained in:
Timo Võhmar 2016-02-02 12:34:51 +02:00
commit 5992155b21
2 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ class Epp::Domain < Domain
before_validation :manage_permissions
def manage_permissions
return if is_admin # this bad hack for 109086524, refactor later
return true if is_transfer
return true if is_transfer || is_renewal
return unless update_prohibited? || delete_prohibited?
add_epp_error('2304', nil, nil, I18n.t(:object_status_prohibits_operation))
false
@ -590,6 +590,7 @@ class Epp::Domain < Domain
statuses.delete(DomainStatus::SERVER_HOLD)
statuses.delete(DomainStatus::EXPIRED)
statuses.delete(DomainStatus::SERVER_UPDATE_PROHIBITED)
save
end