]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/helpers/permissions.js
js beat decoder
[alttp.git] / resources / js / helpers / permissions.js
index cde0d05d7fd293f7114b6d7553ffb1144a9ffaa6..4ce6935d83054ebb8bcb4e127166c53a0f181698 100644 (file)
@@ -58,6 +58,9 @@ export const mayApply = (user, tournament) =>
        user && tournament && tournament.accept_applications &&
                !isRunner(user, tournament) && !isApplicant(user, tournament);
 
+export const mayHandleApplications = (user, tournament) =>
+       tournament && tournament.accept_applications && isTournamentAdmin(user, tournament);
+
 export const mayLockRound = (user, tournament) =>
        !tournament.locked && isTournamentAdmin(user, tournament);
 
@@ -65,6 +68,9 @@ export const maySetSeed = (user, tournament, round) =>
        !round.locked &&
                (isRunner(user, tournament) || isTournamentAdmin(user, tournament));
 
+export const mayUpdateTournament = (user, tournament) =>
+       isAdmin(user) || isTournamentAdmin(user, tournament);
+
 export const mayViewProtocol = (user, tournament) =>
        isTournamentCrew(user, tournament);