]> git.localhorst.tv Git - alttp.git/blobdiff - app/Policies/RoundPolicy.php
tournament monitors
[alttp.git] / app / Policies / RoundPolicy.php
index 230b2254d9c9469d29d388c56905aa9b0647464b..c1a1a4845beb157e0ddcc50547ced4d28b440531 100644 (file)
@@ -101,7 +101,7 @@ class RoundPolicy
         */
        public function setSeed(User $user, Round $round)
        {
-               return $user->role === 'admin' || ($user->isParticipant($round->tournament) && !$round->locked);
+               return $user->isAdmin() || (!$round->locked && ($user->isRunner($round->tournament) || $user->isTournamentAdmin($round->tournament)));
        }
 
        /**
@@ -113,7 +113,7 @@ class RoundPolicy
         */
        public function lock(User $user, Round $round)
        {
-               return $user->role === 'admin' || $user->isTournamentAdmin($round->tournament);
+               return $user->isAdmin() || $user->isTournamentAdmin($round->tournament);
        }
 
        /**