Support sudo admin switch for async dashboard caching
This commit is contained in:
parent
45c6530586
commit
563ff4d961
@ -303,7 +303,10 @@ class Dashboard < ActiveRecord::Base
|
||||
config = { dashboard_id: id,
|
||||
block: block }
|
||||
|
||||
settings[:user_id] = User.current.id if !options.key?(:skip_user_id) || !options[:skip_user_id]
|
||||
if !options.key?(:skip_user_id) || !options[:skip_user_id]
|
||||
settings[:user_id] = User.current.id
|
||||
settings[:user_is_admin] = User.current.admin?
|
||||
end
|
||||
|
||||
if settings.present?
|
||||
settings.each do |key, setting|
|
||||
|
Loading…
Reference in New Issue
Block a user