diff --git a/server_files/controllers/equipe.php b/server_files/controllers/equipe.php index 6727918..57bb549 100644 --- a/server_files/controllers/equipe.php +++ b/server_files/controllers/equipe.php @@ -8,6 +8,9 @@ $trigram = htmlspecialchars($_GET["trigram"]); $team = Team::fromTrigram($trigram); $tournament = Tournament::fromId($team->getTournamentId()); +if ($_SESSION["role"] == Role::ORGANIZER && !$tournament->organize($_SESSION["user_id"])) + require_once "server_files/403.php"; + if ($team === null) require_once "server_files/404.php"; diff --git a/server_files/views/equipe.php b/server_files/views/equipe.php index d555230..65d4dd5 100644 --- a/server_files/views/equipe.php +++ b/server_files/views/equipe.php @@ -78,7 +78,7 @@ -getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?> +getValidationStatus() == ValidationStatus::WAITING) { ?>