User Permissions (User Folder, Read Only, Disable Upload) & more changes
This commit is contained in:
@@ -18,6 +18,15 @@ if (!isset($_SESSION['authenticated']) || $_SESSION['authenticated'] !== true) {
|
||||
http_response_code(401);
|
||||
exit;
|
||||
}
|
||||
$userPermissions = loadUserPermissions($username);
|
||||
$username = $_SESSION['username'] ?? '';
|
||||
if ($username) {
|
||||
$userPermissions = loadUserPermissions($username);
|
||||
if (isset($userPermissions['disableUpload']) && $userPermissions['disableUpload'] === true) {
|
||||
echo json_encode(["error" => "Disabled upload users are not allowed to upload."]);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle test chunk requests.
|
||||
|
||||
Reference in New Issue
Block a user