]> git.localhorst.tv Git - alttp.git/blobdiff - app/Policies/TournamentPolicy.php
lock tournaments
[alttp.git] / app / Policies / TournamentPolicy.php
index 534813c5277f28c9c7f5e1d650ef74a8c4eff9c8..2cc6b6ed2932dd3c1eb60d4424cfe4b322a563d0 100644 (file)
@@ -101,7 +101,7 @@ class TournamentPolicy
         */
        public function addRound(User $user, Tournament $tournament)
        {
-               return $user->role === 'admin' || $user->isParticipant($tournament);
+               return $user->role === 'admin' || (!$tournament->locked && $user->isParticipant($tournament));
        }
 
        /**