Set user's quota_files in SFTPGo

This commit is contained in:
Miraty 2022-06-28 22:08:34 +02:00
parent 6365ac617c
commit 18364c1ff6
2 changed files with 14 additions and 1 deletions

View File

@ -52,3 +52,5 @@ public_sftp_port = 2022
; Will be used in configuration files
https_port = 42443
internal_onion_http_port = 9080
user_quota = 20971520

View File

@ -5,7 +5,18 @@ require "common/init.php";
$authData = json_decode(file_get_contents("php://input"), true);
if (checkPassword($authData['username'], $authData['password']) === true) {
echo '{"status":1,"username":"' . $authData['username'] . '","permissions":{"/":["*"]}}';
echo '
{
"status": 1,
"username": "' . $authData['username'] . '",
"quota_size": ' . CONF['ht']['user_quota'] . ',
"permissions": {
"/": [
"*"
]
}
}
';
http_response_code(200);
} else {
http_response_code(403);