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.
This commit is contained in:
Vincent Petry 2015-12-08 16:48:33 +01:00
parent 28e9bc1156
commit d0cca6c3ad
1 changed files with 1 additions and 1 deletions

View File

@ -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);