Have proper permissions defined for shares without an owner

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2019-10-09 14:34:19 +02:00
parent f09d1d6dbf
commit 0b02d67fdb
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 2 additions and 1 deletions

View File

@ -291,7 +291,8 @@ class Manager implements IManager {
}
$mount = $share->getNode()->getMountPoint();
if ($share->getNode()->getOwner()->getUID() !== $share->getSharedBy()) {
$permissions = $share->getNode()->getPermissions();
if ($share->getNode()->getOwner()->getUID() !== '' && $share->getNode()->getOwner()->getUID() !== $share->getSharedBy()) {
// When it's a reshare use the parent share permissions as maximum
$userMountPointId = $mount->getStorageRootId();
$userMountPoints = $userFolder->getById($userMountPointId);