summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-03-21 20:12:55 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2015-08-10 10:45:16 +0200
commite84cffc063d508f8984909ba3e744eff970ecb88 (patch)
tree07bc4621077f256e3cb28748edab533791201a08 /apps/files/appinfo
parent7e6a2b71fd80fedabc64d10bee5ba0edc0b19cf0 (diff)
downloadnextcloud-server-e84cffc063d508f8984909ba3e744eff970ecb88.tar.gz
nextcloud-server-e84cffc063d508f8984909ba3e744eff970ecb88.zip
Moved core apps to the capabilities manager
* Files * Files_Sharing * Files_Trashbin * Files_Versions
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/application.php12
-rw-r--r--apps/files/appinfo/routes.php9
2 files changed, 12 insertions, 9 deletions
diff --git a/apps/files/appinfo/application.php b/apps/files/appinfo/application.php
index c8aaf375d96..f121eb7a401 100644
--- a/apps/files/appinfo/application.php
+++ b/apps/files/appinfo/application.php
@@ -1,6 +1,5 @@
<?php
/**
- * @author Morris Jobke <hey@morrisjobke.de>
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Tobias Kaminsky <tobias@kaminsky.me>
* @author Vincent Petry <pvince81@owncloud.com>
@@ -21,13 +20,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
-namespace OCA\Files\Appinfo;
+namespace OCA\Files\AppInfo;
use OCA\Files\Controller\ApiController;
use OCP\AppFramework\App;
use \OCA\Files\Service\TagService;
use \OCP\IContainer;
+use OCA\Files\Capabilities;
class Application extends App {
public function __construct(array $urlParams=array()) {
@@ -68,5 +67,12 @@ class Application extends App {
$homeFolder
);
});
+
+ /*
+ * Register capabilities
+ */
+ $server->getCapabilitiesManager()->registerCapability(function() {
+ return new Capabilities();
+ });
}
}
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
index 5aa52f17a29..d1b8954d5ce 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -1,9 +1,9 @@
<?php
/**
* @author Bart Visscher <bartv@thisnet.nl>
- * @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 Tobias Kaminsky <tobias@kaminsky.me>
* @author Tom Needham <tom@owncloud.com>
* @author Vincent Petry <pvince81@owncloud.com>
@@ -24,8 +24,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
-namespace OCA\Files\Appinfo;
+namespace OCA\Files\AppInfo;
$application = new Application();
$application->registerRoutes(
@@ -82,6 +81,4 @@ $this->create('files_ajax_upload', 'ajax/upload.php')
$this->create('download', 'download{file}')
->requirements(array('file' => '.*'))
->actionInclude('files/download.php');
-
-// Register with the capabilities API
-\OCP\API::register('get', '/cloud/capabilities', array('OCA\Files\Capabilities', 'getCapabilities'), 'files', \OCP\API::USER_AUTH);
+