Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Check the permission of the underlying storage
Else shares might expose more permissions than the storage actually
providers.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer authored and nickvergessen committed Sep 19, 2018
commit 4cc8cdc276e07a3449f55d9ba7264a44b58961ea
3 changes: 2 additions & 1 deletion apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ public function getPermissions($target = '') {
if (!$this->isValid()) {
return 0;
}
$permissions = $this->superShare->getPermissions();
$permissions = parent::getPermissions($target) & $this->superShare->getPermissions();

// part files and the mount point always have delete permissions
if ($target === '' || pathinfo($target, PATHINFO_EXTENSION) === 'part') {
$permissions |= \OCP\Constants::PERMISSION_DELETE;
Expand Down