Skip to content

Commit 8760d6e

Browse files
committed
Replace checkSession() with is_admin()
1 parent 5f14636 commit 8760d6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

web/includes/sb-callback.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
$xajax->setRequestURI(XAJAX_REQUEST_URI);
3535
global $userbank;
3636

37-
if (\SessionManager::checkSession()) {
37+
if ($userbank->is_admin()) {
3838
$xajax->registerFunction("AddMod");
3939
$xajax->registerFunction("RemoveMod");
4040
$xajax->registerFunction("AddGroup");
@@ -1885,10 +1885,11 @@ function PrepareReban($bid)
18851885

18861886
function SetupEditServer($sid)
18871887
{
1888+
global $userbank;
18881889
$objResponse = new xajaxResponse();
18891890
$sid = (int)$sid;
18901891

1891-
if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_SERVER_SETTINGS|ADMIN_SERVER_ADD))
1892+
if(!$userbank->HasAccess(ADMIN_OWNER|ADMIN_EDIT_SERVERS))
18921893
{
18931894
$objResponse->redirect("index.php?p=login&m=no_access", 0);
18941895
$log = new CSystemLog("w", "Hacking Attempt", $username . " tried to edit a server, but doesn't have access.");

0 commit comments

Comments
 (0)