Skip to content

Commit 832bcea

Browse files
committed
Allow platform managers to see all public and private events
1 parent d82dd12 commit 832bcea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/policies/better_together/event_policy.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def permitted_query
3737
# Only list communities that are public and where the current person is a member or a creator
3838
query = events_table[:privacy].eq('public')
3939

40-
if agent
40+
if permitted_to?('manage_platform')
41+
query = query.or(communities_table[:privacy].eq('private'))
42+
elsif agent
4143
query = query.or(
4244
events_table[:creator_id].eq(agent.id)
4345
)

0 commit comments

Comments
 (0)