summaryrefslogtreecommitdiffstats
path: root/apps/encryption/appinfo/application.php
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-04-16 13:47:27 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-04-16 14:30:19 +0200
commite93f262eac858bc149872966c85e8019a1970d0a (patch)
tree79088df187ddb383d0b1f770c176584f5b7fe184 /apps/encryption/appinfo/application.php
parent99b0c6e525e71de18245ba434852389349b4f2d7 (diff)
downloadnextcloud-server-e93f262eac858bc149872966c85e8019a1970d0a.tar.gz
nextcloud-server-e93f262eac858bc149872966c85e8019a1970d0a.zip
display warning if password changed or if the keys are not initialized
Diffstat (limited to 'apps/encryption/appinfo/application.php')
-rw-r--r--apps/encryption/appinfo/application.php22
1 files changed, 20 insertions, 2 deletions
diff --git a/apps/encryption/appinfo/application.php b/apps/encryption/appinfo/application.php
index 34845ecf1e8..267f14e8a24 100644
--- a/apps/encryption/appinfo/application.php
+++ b/apps/encryption/appinfo/application.php
@@ -31,6 +31,7 @@ use OCA\Encryption\HookManager;
use OCA\Encryption\Hooks\UserHooks;
use OCA\Encryption\KeyManager;
use OCA\Encryption\Recovery;
+use OCA\Encryption\Session;
use OCA\Encryption\Users\Setup;
use OCA\Encryption\Util;
use OCP\App;
@@ -73,7 +74,7 @@ class Application extends \OCP\AppFramework\App {
$container->query('UserSetup'),
$server->getUserSession(),
$container->query('Util'),
- new \OCA\Encryption\Session($server->getSession()),
+ $container->query('Session'),
$container->query('Crypt'),
$container->query('Recovery'))
]);
@@ -109,6 +110,13 @@ class Application extends \OCP\AppFramework\App {
$server->getConfig());
});
+ $container->registerService('Session',
+ function (IAppContainer $c) {
+ $server = $c->getServer();
+ return new Session($server->getSession());
+ }
+ );
+
$container->registerService('KeyManager',
function (IAppContainer $c) {
$server = $c->getServer();
@@ -138,7 +146,7 @@ class Application extends \OCP\AppFramework\App {
new \OC\Files\View());
});
- $container->registerService('RecoveryController', function (IAppContainer $c) {
+ $container->registerService('RecoveryController', function (IAppContainer $c) {
$server = $c->getServer();
return new \OCA\Encryption\Controller\RecoveryController(
$c->getAppName(),
@@ -148,6 +156,16 @@ class Application extends \OCP\AppFramework\App {
$c->query('Recovery'));
});
+ $container->registerService('StatusController', function (IAppContainer $c) {
+ $server = $c->getServer();
+ return new \OCA\Encryption\Controller\StatusController(
+ $c->getAppName(),
+ $server->getRequest(),
+ $server->getL10N($c->getAppName()),
+ $c->query('Session')
+ );
+ });
+
$container->registerService('UserSetup',
function (IAppContainer $c) {
$server = $c->getServer();