*/
public function view(User $user, Channel $channel)
{
- return $channel->event->visible;
+ return true;
}
/**
->count() > 0;
}
+ /**
+ * Determine whether the user can edit restreams on the channel.
+ *
+ * @param \App\Models\User $user
+ * @param \App\Models\Channel $channel
+ * @return \Illuminate\Auth\Access\Response|bool
+ */
+ public function editRestream(User $user, Channel $channel) {
+ return $user->channel_crews()
+ ->where('role', '=', 'admin')
+ ->where('channel_id', '=', $channel->id)
+ ->count() > 0;
+ }
+
/**
* Determine whether the user can remove episodes from the channel.
*