mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 11:38:30 +02:00
Merge pull request #166 from internetee/story/118822101-epp-errors-new
Story/118822101 epp errors new
This commit is contained in:
commit
74a9b34ad0
6 changed files with 49 additions and 27 deletions
|
@ -11,7 +11,8 @@ class Epp::Domain < Domain
|
|||
return if is_admin # this bad hack for 109086524, refactor later
|
||||
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))
|
||||
stat = (statuses & (DomainStatus::UPDATE_PROHIBIT_STATES + DomainStatus::DELETE_PROHIBIT_STATES)).first
|
||||
add_epp_error('2304', 'status', stat, I18n.t(:object_status_prohibits_operation))
|
||||
false
|
||||
end
|
||||
|
||||
|
@ -143,7 +144,7 @@ class Epp::Domain < Domain
|
|||
code = registrant_frame.try(:text)
|
||||
if code.present?
|
||||
if action == 'chg' && registrant_change_prohibited?
|
||||
add_epp_error('2304', nil, DomainStatus::SERVER_REGISTRANT_CHANGE_PROHIBITED, I18n.t(:object_status_prohibits_operation))
|
||||
add_epp_error('2304', "status", DomainStatus::SERVER_REGISTRANT_CHANGE_PROHIBITED, I18n.t(:object_status_prohibits_operation))
|
||||
end
|
||||
regt = Registrant.find_by(code: code)
|
||||
if regt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue