diff --git a/appinfo/info.xml b/appinfo/info.xml index 0c66659..34cf599 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -8,7 +8,7 @@ Search for torrents within the app from mutiple BT sites; Control Aria2 and manage download tasks from the web; download videos from 700+ video sites(youtube,youku,vimo,dailymotion,twitter,facebook and the likes - 1.0.0 + 1.0.1 agpl jiaxinhuang NCDownloader diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php index b9bbf4d..0a22805 100644 --- a/lib/Controller/SettingsController.php +++ b/lib/Controller/SettingsController.php @@ -99,7 +99,7 @@ public function getGlobalAria2() 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); } diff --git a/lib/Settings/Personal.php b/lib/Settings/Personal.php index 35c0160..f68cb66 100644 --- a/lib/Settings/Personal.php +++ b/lib/Settings/Personal.php @@ -46,6 +46,7 @@ public function getForm() '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), ] ]; diff --git a/src/personalSettings.vue b/src/personalSettings.vue index 1d823c1..4eb298a 100644 --- a/src/personalSettings.vue +++ b/src/personalSettings.vue @@ -13,7 +13,7 @@ />