From 8760d6e333c76e34cc0e104e7ace229f05bed133 Mon Sep 17 00:00:00 2001 From: Marvin Lukaschek Date: Wed, 6 Oct 2021 20:52:16 +0200 Subject: [PATCH] Replace checkSession() with is_admin() --- web/includes/sb-callback.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/includes/sb-callback.php b/web/includes/sb-callback.php index 2152ac4c7..0d1ad579d 100644 --- a/web/includes/sb-callback.php +++ b/web/includes/sb-callback.php @@ -34,7 +34,7 @@ $xajax->setRequestURI(XAJAX_REQUEST_URI); global $userbank; -if (\SessionManager::checkSession()) { +if ($userbank->is_admin()) { $xajax->registerFunction("AddMod"); $xajax->registerFunction("RemoveMod"); $xajax->registerFunction("AddGroup"); @@ -1885,10 +1885,11 @@ function PrepareReban($bid) function SetupEditServer($sid) { + global $userbank; $objResponse = new xajaxResponse(); $sid = (int)$sid; - if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_SERVER_SETTINGS|ADMIN_SERVER_ADD)) + if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_EDIT_SERVERS)) { $objResponse->redirect("index.php?p=login&m=no_access", 0); $log = new CSystemLog("w", "Hacking Attempt", $username . " tried to edit a server, but doesn't have access.");