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:
parent
28e9bc1156
commit
d0cca6c3ad
|
@ -635,7 +635,7 @@ class Share extends Constants {
|
||||||
throw new \Exception($message_t);
|
throw new \Exception($message_t);
|
||||||
}
|
}
|
||||||
// verify that the user has share permission
|
// 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 = 'You are not allowed to share %s';
|
||||||
$message_t = $l->t('You are not allowed to share %s', [$path]);
|
$message_t = $l->t('You are not allowed to share %s', [$path]);
|
||||||
\OCP\Util::writeLog('OCP\Share', sprintf($message, $path), \OCP\Util::DEBUG);
|
\OCP\Util::writeLog('OCP\Share', sprintf($message, $path), \OCP\Util::DEBUG);
|
||||||
|
|
Loading…
Reference in New Issue