Add a dropdown on participate menu, disallow listing participations
Now requires quering the person endpoint to know if an actor
participates in an event, organizers can make authenticated requests to
event { participants { } } to see the pending / approved participants.
Also closes #174
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -99,8 +99,8 @@ defmodule Mobilizon.EventsTest do
|
||||
assert event.ends_on == DateTime.from_naive!(~N[2010-04-17 14:00:00Z], "Etc/UTC")
|
||||
assert event.title == "some title"
|
||||
|
||||
assert hd(Events.list_participants_for_event(event.uuid)).actor.id == actor.id
|
||||
assert hd(Events.list_participants_for_event(event.uuid)).role == :creator
|
||||
assert hd(Events.list_participants_for_event(event.id)).actor.id == actor.id
|
||||
assert hd(Events.list_participants_for_event(event.id)).role == :creator
|
||||
end
|
||||
|
||||
test "create_event/1 with invalid data returns error changeset" do
|
||||
|
||||
@@ -784,7 +784,7 @@ defmodule Mobilizon.Service.ActivityPub.TransmogrifierTest do
|
||||
assert :error == Transmogrifier.handle_incoming(reject_data)
|
||||
|
||||
# Organiser is not present since we use factories directly
|
||||
assert Events.list_participants_for_event(event.uuid) |> Enum.map(& &1.id) ==
|
||||
assert Events.list_participants_for_event(event.id) |> Enum.map(& &1.id) ==
|
||||
[]
|
||||
end
|
||||
|
||||
@@ -812,7 +812,7 @@ defmodule Mobilizon.Service.ActivityPub.TransmogrifierTest do
|
||||
assert activity.data["actor"] == participant_url
|
||||
|
||||
# The only participant left is the organizer
|
||||
assert Events.list_participants_for_event(event.uuid) |> Enum.map(& &1.id) == [
|
||||
assert Events.list_participants_for_event(event.id) |> Enum.map(& &1.id) == [
|
||||
organizer_participation.id
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user