diff --git a/app/controllers/repp/v1/accounts_controller.rb b/app/controllers/repp/v1/accounts_controller.rb index 301bed95f..7db2a3275 100644 --- a/app/controllers/repp/v1/accounts_controller.rb +++ b/app/controllers/repp/v1/accounts_controller.rb @@ -143,7 +143,7 @@ module Repp arr = [] users.each do |u| arr << { id: u.id, username: u.username, - role: u.roles.first } + role: u.roles.first, registrar_name: u.registrar.name } end arr diff --git a/app/controllers/repp/v1/domains/admin_contacts_controller.rb b/app/controllers/repp/v1/domains/admin_contacts_controller.rb index 6ec0e129b..5db865199 100644 --- a/app/controllers/repp/v1/domains/admin_contacts_controller.rb +++ b/app/controllers/repp/v1/domains/admin_contacts_controller.rb @@ -7,7 +7,7 @@ module Repp unless @new_contact.identical_to?(@current_contact) @epp_errors.add(:epp_errors, - msg: 'Admin contacts must be identical', + msg: 'New and current admin contacts ident data must be identical', code: '2304') end diff --git a/app/models/api_user.rb b/app/models/api_user.rb index d357a2e75..dc5cff0cc 100644 --- a/app/models/api_user.rb +++ b/app/models/api_user.rb @@ -74,6 +74,7 @@ class ApiUser < User self.class.where(identity_code: identity_code) .where("identity_code IS NOT NULL AND identity_code != ''") .where.not(id: id) + .includes(:registrar) end def linked_with?(another_api_user)