summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/appinfo
diff options
context:
space:
mode:
authorRoeland Douma <rullzer@users.noreply.github.com>2015-08-10 20:33:50 +0200
committerRoeland Douma <rullzer@users.noreply.github.com>2015-08-10 20:33:50 +0200
commitc2856c05aa9cbdc3adddea127a8588183647ee0a (patch)
treead9f474fb95007345f2e78c3d4e998d0f6f97308 /apps/files_trashbin/appinfo
parent6e4a79f8529a69b846f73257cc581d2b80f7762d (diff)
parentf0b617b50825566ec1b417eed09688e88de5f0bb (diff)
downloadnextcloud-server-c2856c05aa9cbdc3adddea127a8588183647ee0a.tar.gz
nextcloud-server-c2856c05aa9cbdc3adddea127a8588183647ee0a.zip
Merge pull request #15093 from rullzer/capabilities_manager
Capabilities manager
Diffstat (limited to 'apps/files_trashbin/appinfo')
-rw-r--r--apps/files_trashbin/appinfo/application.php37
-rw-r--r--apps/files_trashbin/appinfo/routes.php11
2 files changed, 43 insertions, 5 deletions
diff --git a/apps/files_trashbin/appinfo/application.php b/apps/files_trashbin/appinfo/application.php
new file mode 100644
index 00000000000..8d76d40f639
--- /dev/null
+++ b/apps/files_trashbin/appinfo/application.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCA\Files_Trashbin\AppInfo;
+
+use OCP\AppFramework\App;
+
+class Application extends App {
+ public function __construct(array $urlParams = array()) {
+ parent::__construct('files_trashbin', $urlParams);
+
+ $container = $this->getContainer();
+
+ /*
+ * Register capabilities
+ */
+ $container->registerCapability('OCA\Files_Trashbin\Capabilities');
+ }
+}
diff --git a/apps/files_trashbin/appinfo/routes.php b/apps/files_trashbin/appinfo/routes.php
index 99a03d6b969..cf3d7b77ec2 100644
--- a/apps/files_trashbin/appinfo/routes.php
+++ b/apps/files_trashbin/appinfo/routes.php
@@ -1,9 +1,8 @@
<?php
/**
* @author Georg Ehrke <georg@owncloud.com>
- * @author Joas Schilling <nickvergessen@owncloud.com>
* @author Lukas Reschke <lukas@owncloud.com>
- * @author Morris Jobke <hey@morrisjobke.de>
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @copyright Copyright (c) 2015, ownCloud, Inc.
@@ -22,6 +21,11 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
+
+namespace OCA\Files_Trashbin\AppInfo;
+
+$application = new Application();
+
$this->create('core_ajax_trashbin_preview', 'ajax/preview.php')
->actionInclude('files_trashbin/ajax/preview.php');
$this->create('files_trashbin_ajax_delete', 'ajax/delete.php')
@@ -33,6 +37,3 @@ $this->create('files_trashbin_ajax_list', 'ajax/list.php')
$this->create('files_trashbin_ajax_undelete', 'ajax/undelete.php')
->actionInclude('files_trashbin/ajax/undelete.php');
-
-// Register with the capabilities API
-\OCP\API::register('get', '/cloud/capabilities', array('OCA\Files_Trashbin\Capabilities', 'getCapabilities'), 'files_trashbin', \OCP\API::USER_AUTH);