Refactor user to admin and api user

This commit is contained in:
Martin Lensment 2015-02-13 16:17:06 +02:00
parent f3215680d5
commit 037cb57e00
34 changed files with 551 additions and 551 deletions

View file

@ -176,7 +176,7 @@ class Epp::DomainsController < EppController
{
name: name,
registrar_id: current_api_user.registrar.try(:id),
registrar_id: current_user.registrar.try(:id),
registered_at: Time.now,
period: (period.to_i == 0) ? 1 : period.to_i,
period_unit: Epp::EppDomain.parse_period_unit_from_frame(params[:parsed_frame]) || 'y'
@ -187,7 +187,7 @@ class Epp::DomainsController < EppController
res = {}
res[:pw] = params[:parsed_frame].css('pw').first.try(:text)
res[:action] = params[:parsed_frame].css('transfer').first[:op]
res[:current_user] = current_api_user
res[:current_user] = current_user
res
end
@ -206,7 +206,7 @@ class Epp::DomainsController < EppController
return domain if domain.auth_info == params[:parsed_frame].css('authInfo pw').text
if (domain.registrar != current_api_user.registrar && secure[:secure] == true) &&
if (domain.registrar != current_user.registrar && secure[:secure] == true) &&
epp_errors << {
code: '2302',
msg: I18n.t('errors.messages.domain_exists_but_belongs_to_other_registrar'),