From 9f1906c4cbb9878c5888723b7923fa8e4bebb51f Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Sun, 27 Apr 2025 21:12:02 +0500 Subject: feat: roles --- public/emotes/rate.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public/emotes/rate.php') diff --git a/public/emotes/rate.php b/public/emotes/rate.php index 3cc3e01..bf26bcd 100644 --- a/public/emotes/rate.php +++ b/public/emotes/rate.php @@ -8,6 +8,11 @@ if (!authorize_user(true)) { exit; } +if (isset($_SESSION["user_role"]) && !$_SESSION["user_role"]["permission_rate"]) { + generate_alert("/404.php", "Not enough permissions", 403); + exit; +} + $id = intval(str_safe($_POST["id"] ?? "0", 10)); $rate = intval(str_safe($_POST["rate"] ?? "0", 2)); -- cgit v1.2.3