summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-15 11:53:59 -0500
committerGitHub <noreply@github.com>2017-05-15 11:53:59 -0500
commitad0d0b0916fef2826803c0641371efa0c7e91d64 (patch)
treefafcc0d9f208e74d291eabd22316a8cddaef46dc /lib/private
parent3f201ec7f3ed65ad672da14b55881ad4d678ce29 (diff)
parent9b750c08ac70efd13f97fe3076ad7a1d5d3af5a0 (diff)
downloadnextcloud-server-ad0d0b0916fef2826803c0641371efa0c7e91d64.tar.gz
nextcloud-server-ad0d0b0916fef2826803c0641371efa0c7e91d64.zip
Merge pull request #4685 from nextcloud/fix_4683
fix permissions of mountpoints - take 2
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/View.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 0e22415e6f7..18942d05acf 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1355,8 +1355,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));