diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-11-10 17:35:09 +0300 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-11-10 17:35:09 +0300 |
commit | 7f1fbc8aab458fe8edb913d18cf59d689322aefb (patch) | |
tree | e5a24086e32396e053ab1bb6faa5b0586317a592 /apps | |
parent | dc0ea933aae9c0b4af1aaf0497d0936a4327f70d (diff) |
First process group shares and then user shares (#26568)
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.
Diffstat (limited to 'apps')
-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 7f47b7a7a6d..11e719470e9 100644 --- a/apps/files/lib/Command/TransferOwnership.php +++ b/apps/files/lib/Command/TransferOwnership.php @@ -184,7 +184,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); |