fixed bugs
This commit is contained in:
@@ -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
|
||||
</description>
|
||||
<version>1.0.0</version>
|
||||
<version>1.0.1</version>
|
||||
<licence>agpl</licence>
|
||||
<author mail="freefallbenson@gmail.com" homepage="https://github.com/shiningw">jiaxinhuang</author>
|
||||
<namespace>NCDownloader</namespace>
|
||||
|
||||
@@ -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),
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/>
|
||||
</div>
|
||||
<customOptions
|
||||
v-if="!disallowAria2Settings"
|
||||
v-if="!disallowAria2Settings || isAdmin"
|
||||
name="custom-aria2-settings"
|
||||
title="Personal Aria2 Settings"
|
||||
@mounted="renderAria2"
|
||||
@@ -47,6 +47,7 @@ export default {
|
||||
aria2Options: aria2Options,
|
||||
ytdlOptions: ytdlOptions,
|
||||
disallowAria2Settings: false,
|
||||
isAdmin: false,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@@ -102,6 +103,7 @@ export default {
|
||||
data = JSON.parse(data);
|
||||
let path = "/apps/ncdownloader/personal/save";
|
||||
this.disallowAria2Settings = helper.str2Boolean(data["disallow_aria2_settings"]);
|
||||
this.isAdmin = data["is_admin"];
|
||||
this.options = [
|
||||
{
|
||||
label: "Downloads Folder ",
|
||||
|
||||
Reference in New Issue
Block a user