diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-18 16:36:27 +0100 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-03-22 17:13:34 +0100 |
commit | 52826d0e24b354a38220a904fd21bb1860c70870 (patch) | |
tree | 4ad114e54d249d200d987bbfbc2c2c05d7325066 /apps/files_sharing/api | |
parent | 195efc12eb8c4be01d3160bcb1b8cd3d78a0767b (diff) | |
download | nextcloud-server-52826d0e24b354a38220a904fd21bb1860c70870.tar.gz nextcloud-server-52826d0e24b354a38220a904fd21bb1860c70870.zip |
Block group sharing in API and in share manager
* Fix tests
Diffstat (limited to 'apps/files_sharing/api')
-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 5a2af48d6f5..915022f7d96 100644 --- a/apps/files_sharing/api/share20ocs.php +++ b/apps/files_sharing/api/share20ocs.php @@ -264,6 +264,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'); |