From 60640097293c8d717082853a7ef963a054509025 Mon Sep 17 00:00:00 2001 From: Joshua Perry <45966243+jpez-development@users.noreply.github.com> Date: Wed, 25 Jan 2023 13:29:12 +0000 Subject: [PATCH] login checks work --- CSY2028/EntryPoint.php | 2 +- jobs/Routes.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CSY2028/EntryPoint.php b/CSY2028/EntryPoint.php index e9e5594..1a7a754 100644 --- a/CSY2028/EntryPoint.php +++ b/CSY2028/EntryPoint.php @@ -36,7 +36,7 @@ class EntryPoint { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $functionName = $functionName . 'Submit'; } - + $this->routes->checkLogin($route); $page = $this->routes->getController($controllerName, $functionName); if ($page == null) { $page = $this->routes->notFound(); diff --git a/jobs/Routes.php b/jobs/Routes.php index 7a2b7b2..3c0fa9e 100644 --- a/jobs/Routes.php +++ b/jobs/Routes.php @@ -36,7 +36,6 @@ class Routes implements \CSY2028\Routes { $loginRoutes = []; //TODO: Add login routes //$loginRoutes['user'] = true; - $loginRoutes['/admin/'] = true; $requiresLogin = $loginRoutes[$route] ?? false; if ($requiresLogin && !isset($_SESSION['loggedin'])) {