summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Share/Constants.php1
-rw-r--r--lib/private/Share20/Manager.php11
-rw-r--r--lib/private/Share20/ProviderFactory.php5
3 files changed, 15 insertions, 2 deletions
diff --git a/lib/private/Share/Constants.php b/lib/private/Share/Constants.php
index f351f8d7fda..4eb79734c06 100644
--- a/lib/private/Share/Constants.php
+++ b/lib/private/Share/Constants.php
@@ -37,6 +37,7 @@ class Constants {
const SHARE_TYPE_REMOTE = 6;
const SHARE_TYPE_CIRCLE = 7;
const SHARE_TYPE_GUEST = 8;
+ const SHARE_TYPE_REMOTE_GROUP = 9;
const FORMAT_NONE = -1;
const FORMAT_STATUSES = -2;
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index 5116351a6bc..76b523afd10 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -226,6 +226,10 @@ class Manager implements IManager {
if ($share->getSharedWith() === null) {
throw new \InvalidArgumentException('SharedWith should not be empty');
}
+ } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE_GROUP) {
+ if ($share->getSharedWith() === null) {
+ throw new \InvalidArgumentException('SharedWith should not be empty');
+ }
} else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) {
if ($share->getSharedWith() === null) {
throw new \InvalidArgumentException('SharedWith should not be empty');
@@ -1582,6 +1586,13 @@ class Manager implements IManager {
/**
* @inheritdoc
*/
+ public function outgoingServer2ServerGroupSharesAllowed() {
+ return $this->config->getAppValue('files_sharing', 'outgoing_server2server_group_share_enabled', 'no') === 'yes';
+ }
+
+ /**
+ * @inheritdoc
+ */
public function shareProviderExists($shareType) {
try {
$this->factory->getProviderForType($shareType);
diff --git a/lib/private/Share20/ProviderFactory.php b/lib/private/Share20/ProviderFactory.php
index 7d866db24fa..80ef9412ffa 100644
--- a/lib/private/Share20/ProviderFactory.php
+++ b/lib/private/Share20/ProviderFactory.php
@@ -135,7 +135,8 @@ class ProviderFactory implements IProviderFactory {
$this->serverContainer->getConfig(),
$this->serverContainer->getUserManager(),
$this->serverContainer->getCloudIdManager(),
- $this->serverContainer->getGlobalScaleConfig()
+ $this->serverContainer->getGlobalScaleConfig(),
+ $this->serverContainer->getCloudFederationProviderManager()
);
}
@@ -250,7 +251,7 @@ class ProviderFactory implements IProviderFactory {
$shareType === \OCP\Share::SHARE_TYPE_LINK
) {
$provider = $this->defaultShareProvider();
- } else if ($shareType === \OCP\Share::SHARE_TYPE_REMOTE) {
+ } else if ($shareType === \OCP\Share::SHARE_TYPE_REMOTE || \OCP\Share::SHARE_TYPE_REMOTE_GROUP) {
$provider = $this->federatedShareProvider();
} else if ($shareType === \OCP\Share::SHARE_TYPE_EMAIL) {
$provider = $this->getShareByMailProvider();