]> source.dussan.org Git - nextcloud-server.git/commitdiff
block server-to-server share if files_external is not activates, can be reverted...
authorBjoern Schiessle <schiessle@owncloud.com>
Fri, 13 Jun 2014 10:43:37 +0000 (12:43 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Sat, 14 Jun 2014 08:22:38 +0000 (10:22 +0200)
apps/files_sharing/ajax/external.php
apps/files_sharing/lib/external/manager.php

index 5b4d4656d62a631782495608dd2a0deaa3baab5f..da73310c8df90514d42125bb91893bb86ca11a49 100644 (file)
@@ -12,7 +12,10 @@ OCP\JSON::checkLoggedIn();
 $l = OC_L10N::get('files_sharing');
 
 // check if server admin allows to mount public links from other servers
-if (OCA\Files_Sharing\Helper::isIncomingServer2serverShareEnabled() === false) {
+// check if files_external is enabled
+// FIXME file_external check no longer needed if we use the webdav implementation from core
+if (OCA\Files_Sharing\Helper::isIncomingServer2serverShareEnabled() === false ||
+               \OC_App::isEnabled('files_external') === false) {
        \OCP\JSON::error(array('data' => array('message' => $l->t('Server to server sharing is not enabled on this server'))));
        exit();
 }
index 53e8121b7f6e04a7ecd2a0c335dd148285a60004..381651f8c6a659c9353da87628ea721c354d8e09 100644 (file)
@@ -68,6 +68,12 @@ class Manager {
        }
 
        public function setup() {
+               // don't setup server-to-server shares if the file_external app is disabled
+               // FIXME no longer needed if we use the webdav implementation from  core
+               if (\OC_App::isEnabled('files_external') === false) {
+                       return false;
+               }
+
                $user = $this->userSession->getUser();
                if ($user) {
                        $query = $this->connection->prepare('SELECT `remote`, `share_token`, `password`, `mountpoint`, `owner`