fixed bugs

This commit is contained in:
huangjx
2022-08-04 18:19:03 +08:00
parent 22f4756254
commit 285b9cd7fb
4 changed files with 6 additions and 3 deletions

View File

@@ -99,7 +99,7 @@ class SettingsController extends Controller
public function saveCustomAria2()
{
$noAria2Settings = (bool) Helper::getAdminSettings("disallow_aria2_settings");
if (!$noAria2Settings) {
if ($noAria2Settings && !\OC_User::isAdminUser($this->UserId)) {
$resp = ["error" => "forbidden", "status" => false];
return new JSONResponse($resp);
}

View File

@@ -46,6 +46,7 @@ class Personal implements ISettings
'ncd_seed_time' => $this->settings->get("ncd_seed_time"),
"path" => '/apps/ncdownloader/personal/save',
"disallow_aria2_settings" => Helper::getAdminSettings("disallow_aria2_settings"),
"is_admin" => \OC_User::isAdminUser($this->UserId),
]
];