aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-19 15:56:47 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-19 15:56:47 +0200
commit5b2ef92eb2931804057596c4ce9bac1920c4e5de (patch)
treea2706582c7b327f7b7ada20ff5a2a76bffc1465a /apps/files
parenta86fd873d6102d4defeb4a7e4d4882685753a006 (diff)
parent50e20e531ea942d900c50b510c8c13a6a1dd1465 (diff)
downloadnextcloud-server-5b2ef92eb2931804057596c4ce9bac1920c4e5de.tar.gz
nextcloud-server-5b2ef92eb2931804057596c4ce9bac1920c4e5de.zip
Merge pull request #24004 from owncloud/dont-transfer-files-to-not-ready-user
Introduce isReadyForUser and verify in file transfer ownership
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/command/transferownership.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files/command/transferownership.php b/apps/files/command/transferownership.php
index 6bf2fae6bdf..1f46efdde0d 100644
--- a/apps/files/command/transferownership.php
+++ b/apps/files/command/transferownership.php
@@ -97,6 +97,12 @@ class TransferOwnership extends Command {
$output->writeln("<error>Unknown destination user $this->destinationUser</error>");
return;
}
+
+ // target user has to be ready
+ if (!\OC::$server->getEncryptionManager()->isReadyForUser($this->destinationUser)) {
+ $output->writeln("<error>The target user is not ready to accept files. The user has at least to be logged in once.</error>");
+ return;
+ }
$date = date('c');
$this->finalTarget = "$this->destinationUser/files/transferred from $this->sourceUser on $date";