From 9f1906c4cbb9878c5888723b7923fa8e4bebb51f Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 27 Apr 2025 21:12:02 +0500 Subject: feat: roles --- public/report/index.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public/report/index.php') diff --git a/public/report/index.php b/public/report/index.php index e040123..179c2bd 100644 --- a/public/report/index.php +++ b/public/report/index.php @@ -9,6 +9,11 @@ if (!authorize_user(true)) { exit; } +if (isset($_SESSION["user_role"]) && !$_SESSION["user_role"]["permission_report"]) { + generate_alert("/404.php", "Not enough permissions", 403); + exit; +} + $db = new PDO(DB_URL, DB_USER, DB_PASS); $report = null; $report_id = $_GET["id"] ?? ""; -- cgit v1.2.3