userPermissions issue fixed

This commit is contained in:
Ryan
2025-04-03 22:06:49 -04:00
committed by GitHub
parent 46e9761cae
commit 6926d5b065
9 changed files with 14 additions and 17 deletions

View File

@@ -18,8 +18,9 @@ if (!isset($_SESSION['authenticated']) || $_SESSION['authenticated'] !== true) {
http_response_code(401);
exit;
}
$userPermissions = loadUserPermissions($username);
$username = $_SESSION['username'] ?? '';
$userPermissions = loadUserPermissions($username);
if ($username) {
$userPermissions = loadUserPermissions($username);
if (isset($userPermissions['disableUpload']) && $userPermissions['disableUpload'] === true) {