summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/lib/crypto')
-rw-r--r--apps/encryption/lib/crypto/encryption.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php
index 907a6437f5b..6eff66e72be 100644
--- a/apps/encryption/lib/crypto/encryption.php
+++ b/apps/encryption/lib/crypto/encryption.php
@@ -547,4 +547,17 @@ class Encryption implements IEncryptionModule {
return $path;
}
+ /**
+ * Check if the module is ready to be used by that specific user.
+ * In case a module is not ready - because e.g. key pairs have not been generated
+ * upon login this method can return false before any operation starts and might
+ * cause issues during operations.
+ *
+ * @param string $user
+ * @return boolean
+ * @since 9.1.0
+ */
+ public function isReadyForUser($user) {
+ return $this->keyManager->userHasKeys($user);
+ }
}