summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-08-19 20:04:20 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-08-19 20:04:20 +0200
commitb3356b12883b3178a4dce78b258e7ebafd2c7c9a (patch)
tree214c1326666d660ccc67c02d2470ddb693637332 /lib
parent9dda39bf488b60376b0de8728a61e6fe9f58cdbe (diff)
parent16389270ffc36becba628002a80789acfb2eb83d (diff)
downloadnextcloud-server-b3356b12883b3178a4dce78b258e7ebafd2c7c9a.tar.gz
nextcloud-server-b3356b12883b3178a4dce78b258e7ebafd2c7c9a.zip
Merge pull request #18432 from owncloud/ext-backends.simple
Migrate simple external storage backends to new registration API [part 1]
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/mount/mountpoint.php7
-rw-r--r--lib/private/files/storage/wrapper/permissionsmask.php4
2 files changed, 5 insertions, 6 deletions
diff --git a/lib/private/files/mount/mountpoint.php b/lib/private/files/mount/mountpoint.php
index 5e4949aa9dd..2871bbd9083 100644
--- a/lib/private/files/mount/mountpoint.php
+++ b/lib/private/files/mount/mountpoint.php
@@ -29,7 +29,6 @@ namespace OC\Files\Mount;
use \OC\Files\Filesystem;
use OC\Files\Storage\StorageFactory;
use OC\Files\Storage\Storage;
-use OC\Files\Storage\Wrapper\Wrapper;
use OCP\Files\Mount\IMountPoint;
class MountPoint implements IMountPoint {
@@ -93,11 +92,7 @@ class MountPoint implements IMountPoint {
$this->mountPoint = $mountpoint;
if ($storage instanceof Storage) {
$this->class = get_class($storage);
- $this->storage = $storage;
- // only wrap if not already wrapped
- if (!($this->storage instanceof Wrapper)) {
- $this->storage = $this->loader->wrap($this, $this->storage);
- }
+ $this->storage = $this->loader->wrap($this, $storage);
} else {
// Update old classes to new namespace
if (strpos($storage, 'OC_Filestorage_') !== false) {
diff --git a/lib/private/files/storage/wrapper/permissionsmask.php b/lib/private/files/storage/wrapper/permissionsmask.php
index 993936321d0..50c3f2a6268 100644
--- a/lib/private/files/storage/wrapper/permissionsmask.php
+++ b/lib/private/files/storage/wrapper/permissionsmask.php
@@ -65,6 +65,10 @@ class PermissionsMask extends Wrapper {
return $this->checkMask(Constants::PERMISSION_DELETE) and parent::isDeletable($path);
}
+ public function isSharable($path) {
+ return $this->checkMask(Constants::PERMISSION_SHARE) and parent::isSharable($parm);
+ }
+
public function getPermissions($path) {
return $this->storage->getPermissions($path) & $this->mask;
}