Add config option to allow anonymous reporting

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-06-09 14:07:49 +02:00
parent 2e64da11e3
commit dac47d2abb
14 changed files with 177 additions and 47 deletions

View File

@@ -60,9 +60,10 @@ defmodule Mobilizon.GraphQL.Resolvers.Event do
end
end
def check_event_access(%Event{local: true}), do: true
@spec check_event_access(Event.t()) :: boolean()
defp check_event_access(%Event{local: true}), do: true
def check_event_access(%Event{url: url}) do
defp check_event_access(%Event{url: url}) do
relay_actor_id = Config.relay_actor_id()
Events.check_if_event_has_instance_follow(url, relay_actor_id)
end