diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-22 21:28:13 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-22 21:28:13 +0100 |
commit | d5be21fe8159f7dc567ae9c1264b1f9087f16e8e (patch) | |
tree | d132418dc6e54af935d129daa94e311ca5b9abba /apps/files_sharing/api/share20ocs.php | |
parent | e516612a257e4b542768146d9705b2c6f6999473 (diff) | |
parent | cf3e740ae8ac74a4f37b6701e4a9b2288be34404 (diff) | |
download | nextcloud-server-d5be21fe8159f7dc567ae9c1264b1f9087f16e8e.tar.gz nextcloud-server-d5be21fe8159f7dc567ae9c1264b1f9087f16e8e.zip |
Merge pull request #23398 from owncloud/block_group_sharing
Allow blocking of group sharing
Diffstat (limited to 'apps/files_sharing/api/share20ocs.php')
-rw-r--r-- | apps/files_sharing/api/share20ocs.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/api/share20ocs.php b/apps/files_sharing/api/share20ocs.php index efdd9ecb30e..61d5044cf84 100644 --- a/apps/files_sharing/api/share20ocs.php +++ b/apps/files_sharing/api/share20ocs.php @@ -275,6 +275,10 @@ class Share20OCS { $share->setSharedWith($shareWith); $share->setPermissions($permissions); } else if ($shareType === \OCP\Share::SHARE_TYPE_GROUP) { + if (!$this->shareManager->allowGroupSharing()) { + return new \OC_OCS_Result(null, 404, 'group sharing is disabled by the administrator'); + } + // Valid group is required to share if ($shareWith === null || !$this->groupManager->groupExists($shareWith)) { return new \OC_OCS_Result(null, 404, 'please specify a valid group'); |