fix the perms

This commit is contained in:
Zdenek Borovec 2024-05-13 18:56:31 +02:00
parent ae91560676
commit 04bf687890
3 changed files with 6 additions and 6 deletions

View file

@ -5,8 +5,8 @@ include_once($COMMONS."/header.php");
// If the user does not have the 1000 0000 permission, // If the user does not have the 1000 0000 permission,
// throw a 403: Forbidden error. // throw a 403: Forbidden error.
if (isset($_COOKIE["PHPSESSID"]) && if (!isset($_COOKIE["PHPSESSID"]) ||
(bool)($_SESSION["current_user"]->permissions & 128)) { !(bool)($_SESSION["current_user"]->permissions & 128)) {
header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden", true, 403); header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden", true, 403);
include_once($_SERVER["DOCUMENT_ROOT"]."/errors/403.php"); include_once($_SERVER["DOCUMENT_ROOT"]."/errors/403.php");
include_once($COMMONS."/footer.php"); include_once($COMMONS."/footer.php");

View file

@ -5,8 +5,8 @@ include_once($COMMONS."/header.php");
// If the user does not have the 1000 0000 permission, // If the user does not have the 1000 0000 permission,
// throw a 403: Forbidden error. // throw a 403: Forbidden error.
if (isset($_COOKIE["PHPSESSID"]) && if (!isset($_COOKIE["PHPSESSID"]) ||
(bool)($_SESSION["current_user"]->permissions & 128)) { !(bool)($_SESSION["current_user"]->permissions & 128)) {
header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden", true, 403); header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden", true, 403);
include_once($_SERVER["DOCUMENT_ROOT"]."/errors/403.php"); include_once($_SERVER["DOCUMENT_ROOT"]."/errors/403.php");
include_once($COMMONS."/footer.php"); include_once($COMMONS."/footer.php");

View file

@ -5,8 +5,8 @@ include_once($COMMONS."/header.php");
// If the user does not have the 1000 0000 permission, // If the user does not have the 1000 0000 permission,
// throw a 403: Forbidden error. // throw a 403: Forbidden error.
if (isset($_COOKIE["PHPSESSID"]) && if (!isset($_COOKIE["PHPSESSID"]) ||
(bool)($_SESSION["current_user"]->permissions & 128)) { !(bool)($_SESSION["current_user"]->permissions & 128)) {
header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden", true, 403); header($_SERVER["SERVER_PROTOCOL"]." 403 Forbidden", true, 403);
include_once($_SERVER["DOCUMENT_ROOT"]."/errors/403.php"); include_once($_SERVER["DOCUMENT_ROOT"]."/errors/403.php");
include_once($COMMONS."/footer.php"); include_once($COMMONS."/footer.php");