From fe94036b3a7227334129143acd698105aa646ffd Mon Sep 17 00:00:00 2001 From: wrongecho Date: Thu, 9 Jan 2025 15:11:07 +0000 Subject: [PATCH] Implement new admin check Uses the new $session_is_admin rather than the old validateAdminRole. Reverts #1065 --- inc_all_admin.php | 7 +++---- top_nav.php | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/inc_all_admin.php b/inc_all_admin.php index 186fd77a..0803e149 100644 --- a/inc_all_admin.php +++ b/inc_all_admin.php @@ -6,10 +6,9 @@ require_once "functions.php"; require_once "check_login.php"; -validateAdminRole(); - -// TODO: Change this to enforceAdminPermission(); -// We can't do this until everyone has the new database fields added in db 1.4.9 on Sept 14th 2024 +if (!isset($session_is_admin) || !$session_is_admin) { + exit(WORDING_ROLECHECK_FAILED . "
Tell your admin: Your role does not have admin access."); +} require_once "header.php"; diff --git a/top_nav.php b/top_nav.php index 276bc203..7725c6d3 100644 --- a/top_nav.php +++ b/top_nav.php @@ -161,8 +161,8 @@