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 <rob@instructure.com> QA-Review: Jeremy Putnam <jeremyp@instructure.com> Product-Review: Matt Miller <mmiller@instructure.com> Tested-by: Jenkins
This commit is contained in:
parent
838c654c68
commit
aa8b0e3d1c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue