+
+ /**
+ * Determine whether the user can add rounds the model.
+ *
+ * @param \App\Models\User $user
+ * @param \App\Models\Tournament $tournament
+ * @return \Illuminate\Auth\Access\Response|bool
+ */
+ public function addRound(User $user, Tournament $tournament)
+ {
+ return $user->role === 'admin' || (!$tournament->locked && $user->isParticipant($tournament));
+ }
+
+ /**
+ * Determine whether the user can view the tournament protocol.
+ *
+ * @param \App\Models\User $user
+ * @param \App\Models\Tournament $tournament
+ * @return \Illuminate\Auth\Access\Response|bool
+ */
+ public function viewProtocol(User $user, Tournament $tournament)
+ {
+ return $user->role === 'admin' || $user->isTournamentAdmin($tournament);
+ }
+