From 68e5d80beecb91231d403a1765f9245dc864f2b9 Mon Sep 17 00:00:00 2001 From: nuxsmin Date: Thu, 1 Nov 2018 11:40:51 +0100 Subject: [PATCH] * [ADD] syspass.log file and configuration backup can now be downloaded from Information tab Signed-off-by: nuxsmin --- app/modules/web/Controllers/ConfigBackupController.php | 8 ++++++++ app/modules/web/Controllers/ConfigGeneralController.php | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/app/modules/web/Controllers/ConfigBackupController.php b/app/modules/web/Controllers/ConfigBackupController.php index 4023ca07..678255d0 100644 --- a/app/modules/web/Controllers/ConfigBackupController.php +++ b/app/modules/web/Controllers/ConfigBackupController.php @@ -191,6 +191,10 @@ final class ConfigBackupController extends SimpleControllerBase { $this->checkSecurityToken($this->previousSk, $this->request); + if ($this->configData->isDemoEnabled()) { + return __('Ey, esto es una DEMO!!'); + } + try { SessionContext::close(); @@ -233,6 +237,10 @@ final class ConfigBackupController extends SimpleControllerBase { $this->checkSecurityToken($this->previousSk, $this->request); + if ($this->configData->isDemoEnabled()) { + return __('Ey, esto es una DEMO!!'); + } + try { SessionContext::close(); diff --git a/app/modules/web/Controllers/ConfigGeneralController.php b/app/modules/web/Controllers/ConfigGeneralController.php index b4919763..f473cffc 100644 --- a/app/modules/web/Controllers/ConfigGeneralController.php +++ b/app/modules/web/Controllers/ConfigGeneralController.php @@ -179,6 +179,10 @@ final class ConfigGeneralController extends SimpleControllerBase { $this->checkSecurityToken($this->previousSk, $this->request); + if ($this->configData->isDemoEnabled()) { + return __('Ey, esto es una DEMO!!'); + } + try { SessionContext::close(); @@ -221,6 +225,10 @@ final class ConfigGeneralController extends SimpleControllerBase { $this->checkSecurityToken($this->previousSk, $this->request); + if ($this->configData->isDemoEnabled()) { + return __('Ey, esto es una DEMO!!'); + } + try { $this->eventDispatcher->notifyEvent('download.configBackupFile', new Event($this, EventMessage::factory()