summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/appinfo
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-12-04 19:51:04 +0100
committerBjoern Schiessle <schiessle@owncloud.com>2014-12-19 15:20:24 +0100
commit24993280edcf66f9daa5a5e82428fefef4a3ab56 (patch)
treeede7ca0417af874185588a845fe5f7f754076f60 /apps/files_sharing/appinfo
parentf671b232cc122cdb8e993c8b35bd5419b32a9ae4 (diff)
downloadnextcloud-server-24993280edcf66f9daa5a5e82428fefef4a3ab56.tar.gz
nextcloud-server-24993280edcf66f9daa5a5e82428fefef4a3ab56.zip
Next step in server-to-server sharing next generation, see #12285
Beside some small improvements and bug fixes this will probably the final state for OC8. To test this you need to set up two ownCloud instances. Let's say: URL: myPC/firstOwnCloud user: user1 URL: myPC/secondOwnCloud user: user2 Now user1 can share a file with user2 by entering the username and the URL to the second ownCloud to the share-drop-down, in this case "user2@myPC/secondOwnCloud". The next time user2 login he will get a notification that he received a server-to-server share with the option to accept/decline it. If he accept it the share will be mounted. In both cases a event will be send back to user1 and add a notification to the activity stream that the share was accepted/declined. If user1 decides to unshare the file again from user2 the share will automatically be removed from the second ownCloud server and user2 will see a notification in his activity stream that user1@myPC/firstOwnCloud has unshared the file/folder from him.
Diffstat (limited to 'apps/files_sharing/appinfo')
-rw-r--r--apps/files_sharing/appinfo/routes.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php
index 41bdf554fc5..dd9509575b7 100644
--- a/apps/files_sharing/appinfo/routes.php
+++ b/apps/files_sharing/appinfo/routes.php
@@ -1,5 +1,16 @@
<?php
+namespace OCA\Files_Sharing\AppInfo;
+
+use OCA\Files_Sharing\Application;
+
+$application = new Application();
+$application->registerRoutes($this, [
+ 'resources' => [
+ 'ExternalShares' => ['url' => '/api/externalShares'],
+ ]
+]);
+
/** @var $this \OCP\Route\IRouter */
$this->create('core_ajax_public_preview', '/publicpreview')->action(
function() {
@@ -16,31 +27,32 @@ $this->create('sharing_external_add', '/external')
->actionInclude('files_sharing/ajax/external.php');
$this->create('sharing_external_test_remote', '/testremote')
->actionInclude('files_sharing/ajax/testremote.php');
+
// OCS API
//TODO: SET: mail notification, waiting for PR #4689 to be accepted
-OC_API::register('get',
+\OC_API::register('get',
'/apps/files_sharing/api/v1/shares',
array('\OCA\Files_Sharing\API\Local', 'getAllShares'),
'files_sharing');
-OC_API::register('post',
+\OC_API::register('post',
'/apps/files_sharing/api/v1/shares',
array('\OCA\Files_Sharing\API\Local', 'createShare'),
'files_sharing');
-OC_API::register('get',
+\OC_API::register('get',
'/apps/files_sharing/api/v1/shares/{id}',
array('\OCA\Files_Sharing\API\Local', 'getShare'),
'files_sharing');
-OC_API::register('put',
+\OC_API::register('put',
'/apps/files_sharing/api/v1/shares/{id}',
array('\OCA\Files_Sharing\API\Local', 'updateShare'),
'files_sharing');
-OC_API::register('delete',
+\OC_API::register('delete',
'/apps/files_sharing/api/v1/shares/{id}',
array('\OCA\Files_Sharing\API\Local', 'deleteShare'),
'files_sharing');