Check the permission of the underlying storage

Else shares might expose more permissions than the storage actually
providers.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/11041/head
Roeland Jago Douma 8 years ago
parent bf630e46f6
commit d7931b82ae
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 3
      apps/files_sharing/lib/SharedStorage.php

@ -195,7 +195,8 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto
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;

Loading…
Cancel
Save