Change current_user to current_registrant_user inside the Registrant API

This commit is contained in:
Maciej Szlosarczyk 2018-08-27 11:47:54 +03:00
parent 8aa8aea24e
commit e47248e5a3
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
2 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ module Api
private
def set_domain
domain_pool = current_user.domains
domain_pool = current_registrant_user.domains
@domain = domain_pool.find_by(uuid: params[:domain_uuid])
return if @domain
@ -35,7 +35,7 @@ module Api
end
def authorized_to_manage_locks?
return if current_user.administered_domains.include?(@domain)
return if current_registrant_user.administered_domains.include?(@domain)
render json: { errors: [
{ base: ['Only administrative contacts can manage registry locks'] }