Skip to content
Snippets Groups Projects
Commit 3bf7b54c authored by Björn Schießle's avatar Björn Schießle
Browse files

block server-to-server share if files_external is not activates, can be...

block server-to-server share if files_external is not activates, can be reverted once we moved to the webdav implementation in core
parent 84a651e4
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,10 @@ OCP\JSON::checkLoggedIn(); ...@@ -12,7 +12,10 @@ OCP\JSON::checkLoggedIn();
$l = OC_L10N::get('files_sharing'); $l = OC_L10N::get('files_sharing');
// check if server admin allows to mount public links from other servers // 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')))); \OCP\JSON::error(array('data' => array('message' => $l->t('Server to server sharing is not enabled on this server'))));
exit(); exit();
} }
......
...@@ -68,6 +68,12 @@ class Manager { ...@@ -68,6 +68,12 @@ class Manager {
} }
public function setup() { 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(); $user = $this->userSession->getUser();
if ($user) { if ($user) {
$query = $this->connection->prepare('SELECT `remote`, `share_token`, `password`, `mountpoint`, `owner` $query = $this->connection->prepare('SELECT `remote`, `share_token`, `password`, `mountpoint`, `owner`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment