diff options
author | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-01-01 10:37:28 +0100 |
commit | ef055e79855cf3be1ad5e1aa5f9ebad480062384 (patch) | |
tree | ff074b29a7a87c3ccfc3b10741bbe30cb28e103e /admin/private/permissions.php | |
parent | e3a79df6428799024eac64e9cffbb062317aeb95 (diff) | |
download | main-ef055e79855cf3be1ad5e1aa5f9ebad480062384.tar.gz main-ef055e79855cf3be1ad5e1aa5f9ebad480062384.tar.bz2 main-ef055e79855cf3be1ad5e1aa5f9ebad480062384.zip |
Diffstat (limited to 'admin/private/permissions.php')
-rw-r--r-- | admin/private/permissions.php | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/admin/private/permissions.php b/admin/private/permissions.php deleted file mode 100644 index 8e6f456..0000000 --- a/admin/private/permissions.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -$perms = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/admin/private/permissions.json"), true); - -if (isset($_OVERRIDEPERMISSION)) { - $requested = $_OVERRIDEPERMISSION; -} else { - $requested = substr(explode("/", $_SERVER["PHP_SELF"])[count(explode("/", $_SERVER["PHP_SELF"])) - 1], 0, -4); -} - -$permsOkay = false; -foreach ($perms as $user => $uperms) { - if ($user === $_DATA['id']) { - if (in_array($requested, $uperms) || in_array("*", $uperms)) { - $permsOkay = true; - } - } -} - -if (!$permsOkay && $requested !== "denied") { - if (isset($_PERMSFORAPI) && $_PERMSFORAPI) { - $_GET['_'] = "api." . $requested; - ob_end_clean(); - require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/panes/denied.php"; - die(); - } else if (isset($_PERMSFORSSO) && $_PERMSFORSSO) { - $_GET['_'] = "sso." . $requested; - ob_end_clean(); - require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/panes/denied.php"; - die(); - } else { - $_GET['_'] = "dom." . $requested; - ob_end_clean(); - require_once $_SERVER['DOCUMENT_ROOT'] . "/admin/panes/denied.php"; - die(); - } -}
\ No newline at end of file |