]> git.localhorst.tv Git - alttp.git/commitdiff
show admins finish times unless they're runners
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 30 Mar 2022 11:42:51 +0000 (13:42 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 30 Mar 2022 11:42:51 +0000 (13:42 +0200)
resources/js/helpers/permissions.js

index f86b5851c94c4553486b3f2b741678de9c345197..5979728d449c2c886d777ff90321508ae64c406e 100644 (file)
@@ -51,7 +51,9 @@ export const mayViewProtocol = (user, tournament) =>
 
 export const maySeeResults = (user, tournament, round) =>
        isAdmin(user) || hasFinished(user, round) ||
-               isTournamentMonitor(user, tournament) || Round.isComplete(tournament, round);
+               isTournamentMonitor(user, tournament) ||
+               (isTournamentAdmin(user, tournament) && !isRunner(user, tournament)) ||
+               Round.isComplete(tournament, round);
 
 // Users