mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 17:23:34 +02:00
Disabled contact org
This commit is contained in:
parent
67f23d2769
commit
94a3b7beff
5 changed files with 40 additions and 6 deletions
|
@ -99,6 +99,7 @@ class Epp::ContactsController < EppController
|
|||
msg: I18n.t('errors.messages.required_attribute_missing', key: 'ident country code missing')
|
||||
}
|
||||
end
|
||||
contact_org_disabled
|
||||
@prefix = nil
|
||||
requires 'extension > extdata > ident'
|
||||
end
|
||||
|
@ -111,6 +112,7 @@ class Epp::ContactsController < EppController
|
|||
msg: I18n.t('errors.messages.required_parameter_missing', key: 'add, rem or chg')
|
||||
}
|
||||
end
|
||||
contact_org_disabled
|
||||
requires 'id', 'authInfo > pw'
|
||||
@prefix = nil
|
||||
end
|
||||
|
@ -120,4 +122,13 @@ class Epp::ContactsController < EppController
|
|||
requires 'id', 'authInfo > pw'
|
||||
@prefix = nil
|
||||
end
|
||||
|
||||
def contact_org_disabled
|
||||
return true if ENV['contact_org_enabled'] == 'true'
|
||||
return true if params[:parsed_frame].css('postalInfo org').text.blank?
|
||||
epp_errors << {
|
||||
code: '2306',
|
||||
msg: I18n.t(:parameter_value_policy_error)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue