Uh oh!
There was an error while loading. Please reload this page.
Only perform login check during ownership transfer for encryption - #26149
Conversation
blizzz
commented
Mar 16, 2021
What's missing is that the file system is set up for the target users when they did not log in yet – then its not there and moving fails, with or without --move flag. |
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
16c7794 to
e68c4a4Compareblizzz
commented
Mar 19, 2021
|
ChristophWurst
commented
Mar 19, 2021
| if ($destinationUser->getLastLogin() === 0 || !$this->encryptionManager->isReadyForUser($destinationUid)) { | ||
| // If encryption is on we have to ensure the user has logged in before and that all encryption modules are ready | ||
| if (($this->encryptionManager->isEnabled() && $destinationUser->getLastLogin() === 0) | ||
| || !$this->encryptionManager->isReadyForUser($destinationUid)) { |
There was a problem hiding this comment.
That is a method that's not in the Interface. Do we want to put it there or declare that $this->encryptionManager is the implementation and not the interface even if it is in an app (it's still the files app which will always be shipped, but still)
There was a problem hiding this comment.
Nah let's inject the implementation
There was a problem hiding this comment.
This wasn't taken care of and Psalm will complain 🤯
blizzz
commented
May 3, 2021
/backport to stable21 |
blizzz
commented
May 3, 2021
/backport to stable20 |

With most simple storage we actually want data to be transferable to new users, even before the target user has logged in for the first time. Hence I'm scoping the login check to only be run when encryption is actually in use.
The check was added in #16439. @LEDfan did you use encryption in your tests back then?