diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-11-02 16:19:46 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-11-14 14:39:17 +0100 |
commit | 3fe7186e319233dac0f32ab09b60adce5ad3b4aa (patch) | |
tree | 6dacd7e655c1c144aa71aae7570b44738b70df7b | |
parent | cebb68992509215163f6776b76e48411a31a287e (diff) | |
download | nextcloud-server-3fe7186e319233dac0f32ab09b60adce5ad3b4aa.tar.gz nextcloud-server-3fe7186e319233dac0f32ab09b60adce5ad3b4aa.zip |
First process group shares and then user shares
This prevents a validation failure where the code checks whether a file
is already shared with another user, but the check disables itself when
the owner is the same. Processing the groups first prevents the check
to kick in too early when the group share still has the old owner while
we try transferring the user share.
-rw-r--r-- | apps/files/lib/Command/TransferOwnership.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files/lib/Command/TransferOwnership.php b/apps/files/lib/Command/TransferOwnership.php index 3b51e4a9e6d..c8366be32c4 100644 --- a/apps/files/lib/Command/TransferOwnership.php +++ b/apps/files/lib/Command/TransferOwnership.php @@ -188,7 +188,7 @@ class TransferOwnership extends Command { $output->writeln("Collecting all share information for files and folder of $this->sourceUser ..."); $progress = new ProgressBar($output, count($this->shares)); - foreach([\OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_LINK, \OCP\Share::SHARE_TYPE_REMOTE] as $shareType) { + foreach([\OCP\Share::SHARE_TYPE_GROUP, \OCP\Share::SHARE_TYPE_USER, \OCP\Share::SHARE_TYPE_LINK, \OCP\Share::SHARE_TYPE_REMOTE] as $shareType) { $offset = 0; while (true) { $sharePage = $this->shareManager->getSharesBy($this->sourceUser, $shareType, null, true, 50, $offset); |