diff options
Diffstat (limited to 'apps/files_sharing/api')
-rw-r--r-- | apps/files_sharing/api/share20ocs.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files_sharing/api/share20ocs.php b/apps/files_sharing/api/share20ocs.php index 309e1159fff..588538fbb6c 100644 --- a/apps/files_sharing/api/share20ocs.php +++ b/apps/files_sharing/api/share20ocs.php @@ -271,6 +271,15 @@ class Share20OCS { $permissions &= ~\OCP\Constants::PERMISSION_CREATE; } + /* + * Hack for https://github.com/owncloud/core/issues/22587 + * We check the permissions via webdav. But the permissions of the mount point + * do not equal the share permissions. Here we fix that for federated mounts. + */ + if ($path->getStorage()->instanceOfStorage('OCA\Files_Sharing\External\Storage')) { + $permissions &= ~($permissions & ~$path->getPermissions()); + } + $shareWith = $this->request->getParam('shareWith', null); $shareType = (int)$this->request->getParam('shareType', '-1'); |