feat(api): add GET endpoint for crowd list persons

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-10 14:25:11 +02:00
parent e14cfe8ae2
commit 69306206b1
6 changed files with 113 additions and 0 deletions

View File

@@ -39,6 +39,16 @@ final class CrowdListPolicy
return $this->canManageEvent($user, $event);
}
public function viewPersons(User $user, CrowdList $crowdList, Event $event): bool
{
if ($crowdList->event_id !== $event->id) {
return false;
}
return $user->hasRole('super_admin')
|| $event->organisation->users()->where('user_id', $user->id)->exists();
}
public function managePerson(User $user, CrowdList $crowdList, Event $event): bool
{
if ($crowdList->event_id !== $event->id) {