summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/share/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/share/file.php')
-rw-r--r--apps/files_sharing/lib/share/file.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php
index a5b4e75bceb..93e4af3c393 100644
--- a/apps/files_sharing/lib/share/file.php
+++ b/apps/files_sharing/lib/share/file.php
@@ -160,6 +160,20 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
}
/**
+ * check if server2server share is enabled
+ *
+ * @param int $shareType
+ * @return boolean
+ */
+ public function isShareTypeAllowed($shareType) {
+ if ($shareType === \OCP\Share::SHARE_TYPE_REMOTE) {
+ return \OCA\Files_Sharing\Helper::isOutgoingServer2serverShareEnabled();
+ }
+
+ return true;
+ }
+
+ /**
* resolve reshares to return the correct source item
* @param array $source
* @return array source item