diff --git a/migrate/22.sql b/migrate/22.sql new file mode 100644 index 0000000..576dc1a --- /dev/null +++ b/migrate/22.sql @@ -0,0 +1 @@ +ALTER TABLE `mythicaldash_users` CHANGE `role` `role` ENUM('Administrator','Support','User') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'User'; \ No newline at end of file diff --git a/view/admin/tickets/list.php b/view/admin/tickets/list.php index 69f053a..14ca98b 100644 --- a/view/admin/tickets/list.php +++ b/view/admin/tickets/list.php @@ -1,7 +1,13 @@ getUserInfo("role") == "Administrator" || $session->getUserInfo("role") == "Support") { + +} else { + header('location: /e/401'); + die(); +} + $ticketsPerPage = 20; $page = isset($_GET['page']) && is_numeric($_GET['page']) ? (int) $_GET['page'] : 1; diff --git a/view/components/navbar.php b/view/components/navbar.php index aca9f3b..d888176 100644 --- a/view/components/navbar.php +++ b/view/components/navbar.php @@ -90,7 +90,10 @@ class="dropdown-item d-flex justify-content-center text-primary p-2 h-px-40 mb-1 getUserInfo("username") ?> getUserInfo("role") == "Support") { + echo "warning"; + } + else { echo 'success'; } ?> requestor-type ms-2"> getUserInfo("role") ?> diff --git a/view/components/sidebar.php b/view/components/sidebar.php index 5421fbb..1f0affe 100644 --- a/view/components/sidebar.php +++ b/view/components/sidebar.php @@ -1,5 +1,6 @@ Administration Tools + + +
Overview
+
+ - + + \ No newline at end of file diff --git a/view/requirements/admin.php b/view/requirements/admin.php index 75226cb..fa81fde 100644 --- a/view/requirements/admin.php +++ b/view/requirements/admin.php @@ -1,5 +1,8 @@ getUserInfo("role") == "User") { +if ($session->getUserInfo("role") == "Administrator") { + +} else { header('location: /e/401'); + die(); } ?> \ No newline at end of file