Do not list drafts in upcoming / old events event if moderator

Closes #1086

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-11-02 17:12:35 +01:00
parent 48da35ee41
commit 75296498c4
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -446,8 +446,7 @@ defmodule Mobilizon.GraphQL.Resolvers.Group do
} }
} }
) do ) do
if Actors.is_member?(actor_id, group_id) or is_moderator(user_role) do if Actors.is_member?(actor_id, group_id) do
# TODO : Handle public / restricted to group members events
{:ok, {:ok,
Events.list_organized_events_for_group( Events.list_organized_events_for_group(
group, group,