diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-11-14 16:13:05 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-11-16 19:04:47 +0100 |
commit | b373f52fa8c0eb80338e5f06981f4a048f5720e1 (patch) | |
tree | ff3512ec3f06fda43a7fdb6d80cb19231b2fbf7e /apps | |
parent | e7b1196dd6ca011d8b60764f7c55a5896e96d106 (diff) | |
download | nextcloud-server-b373f52fa8c0eb80338e5f06981f4a048f5720e1.tar.gz nextcloud-server-b373f52fa8c0eb80338e5f06981f4a048f5720e1.zip |
only use one kind of hack for the storage wrappers of the sharing code
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/ajax/shareinfo.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_sharing/ajax/shareinfo.php b/apps/files_sharing/ajax/shareinfo.php index 75d6e6081ec..a32b0a07328 100644 --- a/apps/files_sharing/ajax/shareinfo.php +++ b/apps/files_sharing/ajax/shareinfo.php @@ -63,9 +63,12 @@ $path = $data['realPath']; $isWritable = $share->getPermissions() & (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_CREATE); if (!$isWritable) { + // FIXME: should not add storage wrappers outside of preSetup, need to find a better way + $previousLog = \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false); \OC\Files\Filesystem::addStorageWrapper('readonly', function ($mountPoint, $storage) { return new \OC\Files\Storage\Wrapper\PermissionsMask(array('storage' => $storage, 'mask' => \OCP\Constants::PERMISSION_READ + \OCP\Constants::PERMISSION_SHARE)); }); + \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($previousLog); } $rootInfo = \OC\Files\Filesystem::getFileInfo($path); |