From d0cca6c3aded2aaa35e5b2caab46ff49676eecbd Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 8 Dec 2015 16:48:33 +0100 Subject: 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. --- lib/private/share/share.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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); -- cgit v1.2.3