Fix infinite redirect loop when user doesn't have access permission

This commit is contained in:
Skylar Ittner 2018-05-24 21:08:57 -06:00
parent 2da4e858d2
commit 83d3171456

View File

@ -250,7 +250,7 @@ function redirectIfNotLoggedIn() {
} }
require_once __DIR__ . "/lib/login.php"; require_once __DIR__ . "/lib/login.php";
if (account_has_permission($_SESSION['username'], "INV_VIEW") == FALSE) { if (account_has_permission($_SESSION['username'], "INV_VIEW") == FALSE) {
header('Location: ./index.php'); header('Location: ./index.php?permissionerror');
die("You don't have permission to be here."); die("You don't have permission to be here.");
} }
} }