don't fetch site_admin role overrides for non-site_admin roles
Change-Id: I12fb68f676caef8bd8838b4dc771ca919e218da7 Reviewed-on: https://gerrit.instructure.com/60607 Reviewed-by: Cody Cutrer <cody@instructure.com> Tested-by: Jenkins QA-Review: Charles Kimball <ckimball@instructure.com> Product-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
9359807670
commit
c20d91d9cc
|
@ -859,7 +859,7 @@ class RoleOverride < ActiveRecord::Base
|
|||
accounts = context.account_chain
|
||||
overrides = RoleOverride.where(:context_id => accounts, :context_type => 'Account', :role_id => role)
|
||||
|
||||
unless accounts.include?(Account.site_admin)
|
||||
if role_context == Account.site_admin && !accounts.include?(Account.site_admin)
|
||||
accounts << Account.site_admin
|
||||
overrides += Account.site_admin.role_overrides.where(:role_id => role)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue