[Pkg-owncloud-commits] [owncloud] 129/223: block server-to-server share if files_external is not activates, can be reverted once we moved to the webdav implementation in core
David Prévot
taffit at moszumanska.debian.org
Sun Jun 22 01:54:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit 3bf7b54cd59836165fd9ddb406cf1b56ded84923
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date: Fri Jun 13 12:43:37 2014 +0200
block server-to-server share if files_external is not activates, can be reverted once we moved to the webdav implementation in core
---
apps/files_sharing/ajax/external.php | 5 ++++-
apps/files_sharing/lib/external/manager.php | 6 ++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/apps/files_sharing/ajax/external.php b/apps/files_sharing/ajax/external.php
index 5b4d465..da73310 100644
--- a/apps/files_sharing/ajax/external.php
+++ b/apps/files_sharing/ajax/external.php
@@ -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();
}
diff --git a/apps/files_sharing/lib/external/manager.php b/apps/files_sharing/lib/external/manager.php
index 53e8121..381651f 100644
--- a/apps/files_sharing/lib/external/manager.php
+++ b/apps/files_sharing/lib/external/manager.php
@@ -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`
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list