Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/SharedStorage.php')
-rw-r--r--apps/files_sharing/lib/SharedStorage.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php
index f681854cd2b..2d2f14fc554 100644
--- a/apps/files_sharing/lib/SharedStorage.php
+++ b/apps/files_sharing/lib/SharedStorage.php
@@ -79,6 +79,9 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
private $options;
+ /** @var boolean */
+ private $sharingDisabledForUser;
+
public function __construct($arguments) {
$this->ownerView = $arguments['ownerView'];
$this->logger = \OC::$server->getLogger();
@@ -87,6 +90,11 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
$this->groupedShares = $arguments['groupedShares'];
$this->user = $arguments['user'];
+ if (isset($arguments['sharingDisabledForUser'])) {
+ $this->sharingDisabledForUser = $arguments['sharingDisabledForUser'];
+ } else {
+ $this->sharingDisabledForUser = false;
+ }
parent::__construct([
'storage' => null,
@@ -193,7 +201,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
$permissions |= \OCP\Constants::PERMISSION_DELETE;
}
- if (\OCP\Util::isSharingDisabledForUser()) {
+ if ($this->sharingDisabledForUser) {
$permissions &= ~\OCP\Constants::PERMISSION_SHARE;
}