diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-21 20:12:55 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-08-10 10:45:16 +0200 |
commit | e84cffc063d508f8984909ba3e744eff970ecb88 (patch) | |
tree | 07bc4621077f256e3cb28748edab533791201a08 /apps/files_sharing/appinfo | |
parent | 7e6a2b71fd80fedabc64d10bee5ba0edc0b19cf0 (diff) | |
download | nextcloud-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_sharing/appinfo')
-rw-r--r-- | apps/files_sharing/appinfo/application.php | 13 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 5 |
2 files changed, 12 insertions, 6 deletions
diff --git a/apps/files_sharing/appinfo/application.php b/apps/files_sharing/appinfo/application.php index b9c2844d78c..6ddd25acb52 100644 --- a/apps/files_sharing/appinfo/application.php +++ b/apps/files_sharing/appinfo/application.php @@ -2,6 +2,7 @@ /** * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <icewind@owncloud.com> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @copyright Copyright (c) 2015, ownCloud, Inc. * @license AGPL-3.0 @@ -20,7 +21,7 @@ * */ -namespace OCA\Files_Sharing\Appinfo; +namespace OCA\Files_Sharing\AppInfo; use OCA\Files_Sharing\Helper; use OCA\Files_Sharing\MountProvider; @@ -31,6 +32,7 @@ use OCA\Files_Sharing\Controllers\ExternalSharesController; use OCA\Files_Sharing\Controllers\ShareController; use OCA\Files_Sharing\Middleware\SharingCheckMiddleware; use \OCP\IContainer; +use OCA\Files_Sharing\Capabilities; class Application extends App { public function __construct(array $urlParams = array()) { @@ -122,6 +124,15 @@ class Application extends App { $server->getConfig() ); }); + + /* + * Register capabilities + */ + $server->getCapabilitiesManager()->registerCapability(function() use ($server) { + return new Capabilities( + $server->getConfig() + ); + }); } public function registerMountProviders() { diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 21d21a83441..1e99267a43a 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -97,8 +97,3 @@ API::register('delete', array('\OCA\Files_Sharing\API\Remote', 'declineShare'), 'files_sharing'); -// Register with the capabilities API -API::register('get', - '/cloud/capabilities', - array('OCA\Files_Sharing\Capabilities', 'getCapabilities'), - 'files_sharing', API::USER_AUTH); |