diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-05-04 08:41:54 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-05-04 08:41:54 +0200 |
commit | e5960fe2606d6b84e558ae5b6f888ff3a24e4a05 (patch) | |
tree | f9a091cbbf4cdae423f0273c0f104730d2bfdc84 /lib | |
parent | b04102aab364a62c7a7c3f5cbae9fd0d672842f5 (diff) | |
download | nextcloud-server-e5960fe2606d6b84e558ae5b6f888ff3a24e4a05.tar.gz nextcloud-server-e5960fe2606d6b84e558ae5b6f888ff3a24e4a05.zip |
Revert "Revert "fix permissions of mountpoints""
This reverts commit 70a0e9c2d39532f9de6c6e108ef7eaaebb856ed6.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/View.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 5e581feba6e..c10b5b693b7 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1351,8 +1351,12 @@ class View { return false; } - if ($mount instanceof MoveableMount && $internalPath === '') { - $data['permissions'] |= \OCP\Constants::PERMISSION_DELETE; + if ($internalPath === '') { + if ($mount instanceof MoveableMount) { + $data['permissions'] = $data['permissions'] | \OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE; + } else { + $data['permissions'] = $data['permissions'] & (\OCP\Constants::PERMISSION_ALL - (\OCP\Constants::PERMISSION_UPDATE | \OCP\Constants::PERMISSION_DELETE)); + } } $owner = $this->getUserObjectForOwner($storage->getOwner($internalPath)); |