FIX: admin not getting updates for topics in secure groups
(only where admin is missing explicit permissions)
This commit is contained in:
parent
9c882795c3
commit
d74d5c47ad
|
@ -17,7 +17,12 @@ end
|
|||
|
||||
MessageBus.group_ids_lookup do |env|
|
||||
user = CurrentUser.lookup_from_env(env)
|
||||
user.groups.select('groups.id').map{|g| g.id} if user
|
||||
if user && user.admin?
|
||||
# special rule, admin is allowed access to all groups
|
||||
Group.pluck(:id)
|
||||
elsif user
|
||||
user.groups.pluck('groups.id')
|
||||
end
|
||||
end
|
||||
|
||||
MessageBus.on_connect do |site_id|
|
||||
|
|
Loading…
Reference in New Issue