summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-12-08 16:48:33 +0100
committerVincent Petry <pvince81@owncloud.com>2015-12-08 16:48:33 +0100
commitd0cca6c3aded2aaa35e5b2caab46ff49676eecbd (patch)
tree848f70f93f0199c90639fe0166190f5eb6df6ea8 /lib/private
parent28e9bc115615aab6c951fb846b8bd28aa517331e (diff)
downloadnextcloud-server-d0cca6c3aded2aaa35e5b2caab46ff49676eecbd.tar.gz
nextcloud-server-d0cca6c3aded2aaa35e5b2caab46ff49676eecbd.zip
Add explicit check for groups excluded from sharing
Since isSharable() doesn't do the check for groups excluded from sharing, adding an explicit check in the sharing code.
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/share/share.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 8899df25636..e62bdebc08e 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -635,7 +635,7 @@ class Share extends Constants {
throw new \Exception($message_t);
}
// verify that the user has share permission
- if (!\OC\Files\Filesystem::isSharable($path)) {
+ if (!\OC\Files\Filesystem::isSharable($path) || \OCP\Util::isSharingDisabledForUser()) {
$message = 'You are not allowed to share %s';
$message_t = $l->t('You are not allowed to share %s', [$path]);
\OCP\Util::writeLog('OCP\Share', sprintf($message, $path), \OCP\Util::DEBUG);