attachments do not have users

This commit is contained in:
2023-07-28 08:40:39 +10:00
parent ac94068864
commit 6d4995074b

View File

@@ -108,7 +108,7 @@ class EventConductor extends Conductor
$user = auth()->user();
return $model->attachments()->get()->map(function ($attachment) use ($user) {
if ($attachment->private === false || ($user !== null && ($user->hasPermission('admin/events') === true || $attachment->users->contains($user) === true))) {
if ($attachment->private === false || ($user !== null && $user->hasPermission('admin/events') === true)) {
return MediaConductor::includeModel(request(), 'attachments', $attachment->media);
}
});