summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-02 17:28:33 -0300
committerGitHub <noreply@github.com>2017-05-02 17:28:33 -0300
commitaa39f9b8fcba3c22725882acf13b7d264e8de071 (patch)
treef46d77c9a15bb7d8b2cb6f3c09a96b3eac88fd17
parenta94c706f26266def2a8d66476a57e65677366e04 (diff)
parent75b3b72d89e9ff45a616c54e6f1b5101260f33c4 (diff)
downloadnextcloud-server-aa39f9b8fcba3c22725882acf13b7d264e8de071.tar.gz
nextcloud-server-aa39f9b8fcba3c22725882acf13b7d264e8de071.zip
Merge pull request #4623 from nextcloud/fileinfo-mount-permissions
fix permissions of mountpoints
-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 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));