mirror of
https://github.com/nextcloud/server.git
synced 2026-07-05 12:34:39 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user