diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-19 12:01:13 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-08-28 21:26:33 +0200 |
commit | 28127553591205c3ecd37233509d6ce8bacaed0f (patch) | |
tree | cd0853c6fa38a19a541531092242acad3b151587 /ocs/routes.php | |
parent | 3647fbe7cd86e743b059889d69b03fcf8207780f (diff) | |
download | nextcloud-server-28127553591205c3ecd37233509d6ce8bacaed0f.tar.gz nextcloud-server-28127553591205c3ecd37233509d6ce8bacaed0f.zip |
Move federated sharing routes to the federatedfilesharingapp
* Move routes to app
* Move routes over to the AppFramework
* Fix tests
There is plenty of stuff to fix properly here. But out of scope for now.
Diffstat (limited to 'ocs/routes.php')
-rw-r--r-- | ocs/routes.php | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/ocs/routes.php b/ocs/routes.php index d14f32e045c..3085cd9db65 100644 --- a/ocs/routes.php +++ b/ocs/routes.php @@ -75,76 +75,3 @@ API::register( 'core', API::USER_AUTH ); - -// Server-to-Server Sharing -if (\OC::$server->getAppManager()->isEnabledForUser('files_sharing')) { - $federatedSharingApp = new \OCA\FederatedFileSharing\AppInfo\Application(); - $addressHandler = new \OCA\FederatedFileSharing\AddressHandler( - \OC::$server->getURLGenerator(), - \OC::$server->getL10N('federatedfilesharing') - ); - $notification = new \OCA\FederatedFileSharing\Notifications( - $addressHandler, - \OC::$server->getHTTPClientService(), - new \OCA\FederatedFileSharing\DiscoveryManager(\OC::$server->getMemCacheFactory(), \OC::$server->getHTTPClientService()), - \OC::$server->getJobList() - ); - $s2s = new OCA\FederatedFileSharing\RequestHandler( - $federatedSharingApp->getFederatedShareProvider(), - \OC::$server->getDatabaseConnection(), - \OC::$server->getShareManager(), - \OC::$server->getRequest(), - $notification, - $addressHandler, - \OC::$server->getUserManager() - ); - API::register('post', - '/cloud/shares', - array($s2s, 'createShare'), - 'files_sharing', - API::GUEST_AUTH - ); - - API::register('post', - '/cloud/shares/{id}/reshare', - array($s2s, 'reShare'), - 'files_sharing', - API::GUEST_AUTH - ); - - API::register('post', - '/cloud/shares/{id}/permissions', - array($s2s, 'updatePermissions'), - 'files_sharing', - API::GUEST_AUTH - ); - - - API::register('post', - '/cloud/shares/{id}/accept', - array($s2s, 'acceptShare'), - 'files_sharing', - API::GUEST_AUTH - ); - - API::register('post', - '/cloud/shares/{id}/decline', - array($s2s, 'declineShare'), - 'files_sharing', - API::GUEST_AUTH - ); - - API::register('post', - '/cloud/shares/{id}/unshare', - array($s2s, 'unshare'), - 'files_sharing', - API::GUEST_AUTH - ); - - API::register('post', - '/cloud/shares/{id}/revoke', - array($s2s, 'revoke'), - 'files_sharing', - API::GUEST_AUTH - ); -} |