From aa8b0e3d1c2f9712c30f2100c8d1fc21acdbd208 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Thu, 24 May 2018 15:50:54 -0600 Subject: [PATCH] use @domain_root_account as the context for a bare /api/v1/users/self fixes CORE-1458 test plan: * go to /api/v1/users/self; it should work Change-Id: I0f929ebed3fb809d554c9476946a881124e62280 Reviewed-on: https://gerrit.instructure.com/151438 Reviewed-by: Rob Orton QA-Review: Jeremy Putnam Product-Review: Matt Miller Tested-by: Jenkins --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0cfad890332..2922c7604d8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1216,7 +1216,7 @@ class UsersController < ApplicationController def api_show @user = api_find(User, params[:id]) if @user.grants_right?(@current_user, session, :api_show_user) - render :json => user_json(@user, @current_user, session, %w{locale avatar_url permissions email}, @current_user.pseudonym.account) + render :json => user_json(@user, @current_user, session, %w{locale avatar_url permissions email}, @domain_root_account) else render_unauthorized_action end