summaryrefslogtreecommitdiffstats
path: root/settings/ajax/decryptall.php
diff options
context:
space:
mode:
Diffstat (limited to 'settings/ajax/decryptall.php')
-rw-r--r--settings/ajax/decryptall.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/settings/ajax/decryptall.php b/settings/ajax/decryptall.php
new file mode 100644
index 00000000000..02a9bfe96b1
--- /dev/null
+++ b/settings/ajax/decryptall.php
@@ -0,0 +1,14 @@
+<?php
+
+$status = OC_App::isEnabled('files_encryption');
+OC_App::enable('files_encryption');
+
+OCA\Encryption\Crypt::decryptAll();
+
+if ($status === false) {
+ OC_App::disable('files_encryption');
+}
+
+
+\OCP\JSON::success(array('data' => array('message' => 'looks good')));
+