Skip to content

Commit

Permalink
Move encryption from app.php to IBootstrap
Browse files Browse the repository at this point in the history
Signed-off-by: Morris Jobke <[email protected]>
  • Loading branch information
MorrisJobke committed Nov 10, 2020
1 parent f23c216 commit 420a3c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 39 deletions.
38 changes: 0 additions & 38 deletions apps/encryption/appinfo/app.php

This file was deleted.

17 changes: 16 additions & 1 deletion apps/encryption/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,16 @@
use OCA\Encryption\Session;
use OCA\Encryption\Users\Setup;
use OCA\Encryption\Util;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\Encryption\IManager;
use OCP\IConfig;
use OCP\IServerContainer;
use Psr\Container\ContainerInterface;
use Symfony\Component\Console\Helper\QuestionHelper;

class Application extends \OCP\AppFramework\App {
class Application extends \OCP\AppFramework\App implements IBootstrap {

/** @var IManager */
private $encryptionManager;
Expand All @@ -65,6 +68,12 @@ public function __construct($urlParams = []) {
$this->encryptionManager = \OC::$server->getEncryptionManager();
$this->config = \OC::$server->getConfig();
$this->registerServices();
if ($this->encryptionManager->isReady()) {
$app->registerEncryptionModule();
$app->registerHooks();
$app->setUp();
}
\OCP\Util::addScript('encryption', 'encryption');
}

public function setUp() {
Expand Down Expand Up @@ -263,4 +272,10 @@ public function registerServices() {
}
);
}

public function register(IRegistrationContext $context): void {
}

public function boot(IBootContext $context): void {
}
}

0 comments on commit 420a3c3

Please sign in to comment.