Adjusting logic to match intention (#17015)
Unearthed in a deep read of the code during the review of forem/forem#16997
This commit is contained in:
parent
f680bc8d53
commit
010fc3bce0
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ class DashboardsController < ApplicationController
|
|||
fetch_and_authorize_user
|
||||
target = @user
|
||||
# NOTE: This is a subtle policy check happening here that we are not encapsulating
|
||||
not_authorized if params[:org_id] && !@user.org_admin?(params[:org_id] || @user.any_admin?)
|
||||
not_authorized if params[:org_id] && !(@user.org_admin?(params[:org_id]) || @user.any_admin?)
|
||||
|
||||
@organizations = @user.admin_organizations
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue