Disabled fax

This commit is contained in:
Priit Tark 2015-03-16 17:23:05 +02:00
parent e00b81e6da
commit b52ec4e35e
3 changed files with 36 additions and 1 deletions

View file

@ -100,6 +100,7 @@ class Epp::ContactsController < EppController
}
end
contact_org_disabled
fax_disabled
@prefix = nil
requires 'extension > extdata > ident'
end
@ -113,6 +114,7 @@ class Epp::ContactsController < EppController
}
end
contact_org_disabled
fax_disabled
requires 'id', 'authInfo > pw'
@prefix = nil
end
@ -131,4 +133,13 @@ class Epp::ContactsController < EppController
msg: "#{I18n.t(:contact_org_error)}: postalInfo > org [org]"
}
end
def fax_disabled
return true if ENV['fax_enabled'] == 'true'
return true if params[:parsed_frame].css('fax').text.blank?
epp_errors << {
code: '2306',
msg: "#{I18n.t(:contact_fax_error)}: fax [fax]"
}
end
end