aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/helper.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-06-12 19:49:52 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-14 10:22:38 +0200
commit84a651e46deff5fe577ed564e5826ff24c18f9a5 (patch)
tree1b137ebc8b504180b7bfeed99590c8c751af07e9 /apps/files_sharing/lib/helper.php
parente7b58ed2bdfe4bb56866e76b8fdd618946fa3c51 (diff)
downloadnextcloud-server-84a651e46deff5fe577ed564e5826ff24c18f9a5.tar.gz
nextcloud-server-84a651e46deff5fe577ed564e5826ff24c18f9a5.zip
add settings to disable server to server sharing
Diffstat (limited to 'apps/files_sharing/lib/helper.php')
-rw-r--r--apps/files_sharing/lib/helper.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/helper.php b/apps/files_sharing/lib/helper.php
index 49546f012a6..a86cb832f3b 100644
--- a/apps/files_sharing/lib/helper.php
+++ b/apps/files_sharing/lib/helper.php
@@ -202,4 +202,24 @@ class Helper {
return $path;
}
+
+ /**
+ * allow users from other ownCloud instances to mount public links share by this instance
+ * @return bool
+ */
+ public static function isOutgoingServer2serverShareEnabled() {
+ $appConfig = \OC::$server->getAppConfig();
+ $result = $appConfig->getValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes');
+ return ($result === 'yes') ? true : false;
+ }
+
+ /**
+ * allow user to mount public links from onther ownClouds
+ * @return bool
+ */
+ public static function isIncomingServer2serverShareEnabled() {
+ $appConfig = \OC::$server->getAppConfig();
+ $result = $appConfig->getValue('files_sharing', 'incoming_server2server_share_enabled', 'yes');
+ return ($result === 'yes') ? true : false;
+ }
}