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
if Actors.is_member?(actor_id, group_id) or is_moderator(user_role) do
# TODO : Handle public / restricted to group members events
if Actors.is_member?(actor_id, group_id) do
{:ok,
Events.list_organized_events_for_group(
group,