mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Refactor user to admin and api user
This commit is contained in:
parent
f3215680d5
commit
037cb57e00
34 changed files with 551 additions and 551 deletions
|
@ -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'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue