fixed bugs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user