diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-14 17:32:25 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-15 15:07:40 +0200 |
commit | 50e20e531ea942d900c50b510c8c13a6a1dd1465 (patch) | |
tree | db641d3406f9930dce8ba6223dd69e79b36f7627 /lib/private/encryption | |
parent | 5911ce530b003d46348f59e9280b610f684de85a (diff) | |
download | nextcloud-server-50e20e531ea942d900c50b510c8c13a6a1dd1465.tar.gz nextcloud-server-50e20e531ea942d900c50b510c8c13a6a1dd1465.zip |
Introduce isReadyForUser and verify in file transfer ownership - fixes #23786
Diffstat (limited to 'lib/private/encryption')
-rw-r--r-- | lib/private/encryption/manager.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/private/encryption/manager.php b/lib/private/encryption/manager.php index d45bbf07ee9..8714d161807 100644 --- a/lib/private/encryption/manager.php +++ b/lib/private/encryption/manager.php @@ -117,6 +117,25 @@ class Manager implements IManager { } /** + * @param string $user + */ + public function isReadyForUser($user) { + if (!$this->isReady()) { + return false; + } + + foreach ($this->getEncryptionModules() as $module) { + /** @var IEncryptionModule $m */ + $m = call_user_func($module['callback']); + if (!$m->isReadyForUser($user)) { + return false; + } + } + + return true; + } + + /** * Registers an callback function which must return an encryption module instance * * @param string $id |