We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d82dd12 commit 832bceaCopy full SHA for 832bcea
app/policies/better_together/event_policy.rb
@@ -37,7 +37,9 @@ def permitted_query
37
# Only list communities that are public and where the current person is a member or a creator
38
query = events_table[:privacy].eq('public')
39
40
- if agent
+ if permitted_to?('manage_platform')
41
+ query = query.or(communities_table[:privacy].eq('private'))
42
+ elsif agent
43
query = query.or(
44
events_table[:creator_id].eq(agent.id)
45
)
0 commit comments