Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-03-18 18:36:27 +0300
committerRoeland Jago Douma <rullzer@owncloud.com>2016-03-22 14:37:20 +0300
commitaa75cfcf144eda64db1ff5df8a255c3c23b869fd (patch)
treed99bf31967773c3b559dcad81071d2508d6fd937 /lib
parente9fc791e9fc72395193f66fa428be84d97ce3cab (diff)
Block group sharing in API and in share manager
* Fix tests
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share20/manager.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/share20/manager.php b/lib/private/share20/manager.php
index 4733167cb14..5e40acefbef 100644
--- a/lib/private/share20/manager.php
+++ b/lib/private/share20/manager.php
@@ -361,6 +361,11 @@ class Manager implements IManager {
* @throws \Exception
*/
protected function groupCreateChecks(\OCP\Share\IShare $share) {
+ // Verify group shares are allowed
+ if (!$this->allowGroupSharing()) {
+ throw new \Exception('Group sharing is now allowed');
+ }
+
// Verify if the user can share with this group
if ($this->shareWithGroupMembersOnly()) {
$sharedBy = $this->userManager->get($share->getSharedBy());