From 60ea4388edb3f3c5aebb3afbedc0ff5c29bc4c7b Mon Sep 17 00:00:00 2001 From: Robin Appelman <icewind@owncloud.com> Date: Thu, 5 Jun 2014 12:45:33 +0200 Subject: [PATCH] Limit permissions to share permissions --- apps/files_sharing/lib/cache.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index f6c42e930d..d0919f0dfd 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -94,6 +94,7 @@ class Shared_Cache extends Cache { $data['is_share_mount_point'] = true; } $data['uid_owner'] = $this->storage->getOwner($file); + $data['permissions'] = $data['permissions'] & $this->storage->getPermissions(''); return $data; } } else { @@ -130,6 +131,7 @@ class Shared_Cache extends Cache { $data['name'] = basename($this->storage->getMountPoint()); $data['is_share_mount_point'] = true; } + $data['permissions'] = $data['permissions'] & $this->storage->getPermissions(''); return $data; } return false; @@ -157,6 +159,7 @@ class Shared_Cache extends Cache { $sourceFolderContent[$key]['path'] = $dir . $c['name']; $sourceFolderContent[$key]['uid_owner'] = $parent['uid_owner']; $sourceFolderContent[$key]['displayname_owner'] = $parent['uid_owner']; + $sourceFolderContent[$key]['permissions'] = $sourceFolderContent[$key]['permissions'] & $this->storage->getPermissions(''); } return $sourceFolderContent; -- GitLab