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/send.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public/report/send.php') diff --git a/public/report/send.php b/public/report/send.php index 0b7abaf..e5a77be 100644 --- a/public/report/send.php +++ b/public/report/send.php @@ -8,6 +8,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); if (!isset($_POST["contents"])) { -- cgit v1.2.3