Set user's quota_files in SFTPGo
This commit is contained in:
parent
6365ac617c
commit
18364c1ff6
2 changed files with 14 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue