From 4e0574e184bb3fa915da88d45f909982f2be8c13 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Fri, 20 May 2022 00:13:06 +0200 Subject: Port encryption admin settings to vue Signed-off-by: Carl Schwan --- apps/settings/lib/Settings/Admin/Security.php | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'apps/settings/lib/Settings') diff --git a/apps/settings/lib/Settings/Admin/Security.php b/apps/settings/lib/Settings/Admin/Security.php index f84ef03b61b..63d3137a45c 100644 --- a/apps/settings/lib/Settings/Admin/Security.php +++ b/apps/settings/lib/Settings/Admin/Security.php @@ -68,26 +68,15 @@ class Security implements ISettings { } } - $this->initialState->provideInitialState( - 'mandatory2FAState', - $this->mandatoryTwoFactor->getState() - ); + $this->initialState->provideInitialState('mandatory2FAState', $this->mandatoryTwoFactor->getState()); + $this->initialState->provideInitialState('two-factor-admin-doc', $this->urlGenerator->linkToDocs('admin-2fa')); + $this->initialState->provideInitialState('encryption-enabled', $this->manager->isEnabled()); + $this->initialState->provideInitialState('encryption-ready', $this->manager->isReady()); + $this->initialState->provideInitialState('external-backends-enabled', count($this->userManager->getBackends()) > 1); + $this->initialState->provideInitialState('encryption-modules', $encryptionModuleList); + $this->initialState->provideInitialState('encryption-admin-doc', $this->urlGenerator->linkToDocs('admin-encryption')); - $this->initialState->provideInitialState( - 'two-factor-admin-doc', - $this->urlGenerator->linkToDocs('admin-2fa') - ); - - $parameters = [ - // Encryption API - 'encryptionEnabled' => $this->manager->isEnabled(), - 'encryptionReady' => $this->manager->isReady(), - 'externalBackendsEnabled' => count($this->userManager->getBackends()) > 1, - // Modules - 'encryptionModules' => $encryptionModuleList, - ]; - - return new TemplateResponse('settings', 'settings/admin/security', $parameters, ''); + return new TemplateResponse('settings', 'settings/admin/security', [], ''); } /** -- cgit v1.2.3