]> source.dussan.org Git - nextcloud-server.git/commitdiff
announce public endpoints to sync trusted servers
authorBjoern Schiessle <bjoern@schiessle.org>
Fri, 24 Feb 2017 10:02:34 +0000 (11:02 +0100)
committerBjoern Schiessle <bjoern@schiessle.org>
Thu, 9 Mar 2017 09:07:52 +0000 (10:07 +0100)
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
lib/private/OCS/Provider.php

index 7d53479c6e2d367e02b487e9fa09b231529a905a..2e9ed85b67b45cea84c98a31ea854e446bb20605 100644 (file)
@@ -70,6 +70,23 @@ class Provider extends \OCP\AppFramework\Controller {
                        ];
                }
 
+               if ($this->appManager->isEnabledForUser('federation')) {
+                       if (isset($services['FEDERATED_SHARING'])) {
+                               $services['FEDERATED_SHARING']['endpoints']['shared-secret'] = '/ocs/v2.php/cloud/shared-secret';
+                               $services['FEDERATED_SHARING']['endpoints']['system-address-book'] = '/remote.php/dav/addressbooks/system/system/system';
+                               $services['FEDERATED_SHARING']['endpoints']['carddav-user'] = 'system';
+                       } else {
+                               $services['FEDERATED_SHARING'] = [
+                                       'version' => 1,
+                                       'endpoints' => [
+                                               'shared-secret' => '/ocs/v2.php/cloud/shared-secret',
+                                               'system-address-book' => '/remote.php/dav/addressbooks/system/system/system',
+                                               'carddav-user' => 'system'
+                                       ],
+                               ];
+                       }
+               }
+
                if($this->appManager->isEnabledForUser('activity')) {
                        $services['ACTIVITY'] = [
                                'version' => 1,