diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-08-20 14:53:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 14:53:41 +0200 |
commit | da6cacb951b4aeff96bb784b572377af8e5d4767 (patch) | |
tree | 80b918de18af736ed31337e457bde5e6fcd7a7cb /apps | |
parent | af495122c1205260b5a36bd50bc4448436838573 (diff) | |
parent | ae90f3eb17d2d96010a26bc475563fa69cfc59bb (diff) | |
download | nextcloud-server-da6cacb951b4aeff96bb784b572377af8e5d4767.tar.gz nextcloud-server-da6cacb951b4aeff96bb784b572377af8e5d4767.zip |
Merge pull request #10566 from nextcloud/stable12-10348-fix-transfering-ownership-of-a-share-to-user-with-same-id-as-receiver
[stable12] Fix transfering ownership of a share to user with same id as receiver
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Command/TransferOwnership.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php index aa07cf9de91..b5d8455865f 100644 --- a/apps/files/lib/Command/TransferOwnership.php +++ b/apps/files/lib/Command/TransferOwnership.php @@ -259,7 +259,8 @@ class TransferOwnership extends Command { foreach($this->shares as $share) { try { - if ($share->getSharedWith() === $this->destinationUser) { + if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER && + $share->getSharedWith() === $this->destinationUser) { // Unmount the shares before deleting, so we don't try to get the storage later on. $shareMountPoint = $this->mountManager->find('/' . $this->destinationUser . '/files' . $share->getTarget()); if ($shareMountPoint) { |