diabled admin and csr check for all route entries
This commit is contained in:
@@ -38,7 +38,10 @@ class Aria2Controller extends Controller
|
|||||||
$this->aria2->init();
|
$this->aria2->init();
|
||||||
$this->dbconn = new DBConn();
|
$this->dbconn = new DBConn();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function Action($path)
|
public function Action($path)
|
||||||
{
|
{
|
||||||
$path = strtolower(trim($path));
|
$path = strtolower(trim($path));
|
||||||
@@ -97,6 +100,10 @@ class Aria2Controller extends Controller
|
|||||||
$data = $this->aria2->start();
|
$data = $this->aria2->start();
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function Update()
|
public function Update()
|
||||||
{
|
{
|
||||||
$resp = folderScan::create()->scan();
|
$resp = folderScan::create()->scan();
|
||||||
@@ -110,6 +117,10 @@ class Aria2Controller extends Controller
|
|||||||
'path' => $this->urlGenerator->linkToRoute('ncdownloader.Aria2.Action', ['path' => $path]),
|
'path' => $this->urlGenerator->linkToRoute('ncdownloader.Aria2.Action', ['path' => $path]),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function getStatus($path)
|
public function getStatus($path)
|
||||||
{
|
{
|
||||||
//$path = $this->request->getRequestUri();
|
//$path = $this->request->getRequestUri();
|
||||||
|
|||||||
@@ -54,7 +54,10 @@ class MainController extends Controller
|
|||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function Download()
|
public function Download()
|
||||||
{
|
{
|
||||||
$url = trim($this->request->getParam('form_input_text'));
|
$url = trim($this->request->getParam('form_input_text'));
|
||||||
|
|||||||
@@ -21,7 +21,10 @@ class SearchController extends Controller
|
|||||||
$this->urlGenerator = \OC::$server->getURLGenerator();
|
$this->urlGenerator = \OC::$server->getURLGenerator();
|
||||||
$this->search = new torrentSearch();
|
$this->search = new torrentSearch();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function execute()
|
public function execute()
|
||||||
{
|
{
|
||||||
$keyword = trim($this->request->getParam('form_input_text'));
|
$keyword = trim($this->request->getParam('form_input_text'));
|
||||||
|
|||||||
@@ -40,6 +40,10 @@ class SettingsController extends Controller
|
|||||||
$this->save($key, $value);
|
$this->save($key, $value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function aria2Get()
|
public function aria2Get()
|
||||||
{
|
{
|
||||||
$data = json_decode($this->settings->get("custom_aria2_settings"));
|
$data = json_decode($this->settings->get("custom_aria2_settings"));
|
||||||
@@ -58,12 +62,20 @@ class SettingsController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function aria2Save()
|
public function aria2Save()
|
||||||
{
|
{
|
||||||
$params = $this->request->getParams();
|
$params = $this->request->getParams();
|
||||||
$data = Helper::filterData($params, Helper::aria2Options());
|
$data = Helper::filterData($params, Helper::aria2Options());
|
||||||
$this->settings->save("custom_aria2_settings", json_encode($data));
|
$this->settings->save("custom_aria2_settings", json_encode($data));
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function aria2Delete()
|
public function aria2Delete()
|
||||||
{
|
{
|
||||||
$saved = json_decode($this->settings->get("custom_aria2_settings"),1);
|
$saved = json_decode($this->settings->get("custom_aria2_settings"),1);
|
||||||
|
|||||||
@@ -69,6 +69,10 @@ class YoutubeController extends Controller
|
|||||||
$resp['counter'] = ['youtube-dl' => count($data)];
|
$resp['counter'] = ['youtube-dl' => count($data)];
|
||||||
return new JSONResponse($resp);
|
return new JSONResponse($resp);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function Download()
|
public function Download()
|
||||||
{
|
{
|
||||||
$params = array();
|
$params = array();
|
||||||
@@ -96,7 +100,10 @@ class YoutubeController extends Controller
|
|||||||
return ['error' => $this->l10n->t("failed to get any url!")];
|
return ['error' => $this->l10n->t("failed to get any url!")];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
*/
|
||||||
public function Delete()
|
public function Delete()
|
||||||
{
|
{
|
||||||
$gid = $this->request->getParam('gid');
|
$gid = $this->request->getParam('gid');
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ extract($_);
|
|||||||
?>
|
?>
|
||||||
<div class="ncdownloader-admin-settings">
|
<div class="ncdownloader-admin-settings">
|
||||||
<form id="ncdownloader" class="section">
|
<form id="ncdownloader" class="section">
|
||||||
<h2>ncDownloader admin Settings</h2>
|
<h2>NCDownloader admin Settings</h2>
|
||||||
<div>
|
<div>
|
||||||
<span id="ncdownloader-message-banner"></span>
|
<span id="ncdownloader-message-banner"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user