mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
test(IT): Test Config Account use cases
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -54,6 +54,11 @@ final class XmlExportController extends SimpleControllerBase
|
||||
{
|
||||
use JsonTrait;
|
||||
|
||||
/**
|
||||
* @throws SessionTimeout
|
||||
* @throws SPException
|
||||
* @throws UnauthorizedPageException
|
||||
*/
|
||||
public function __construct(
|
||||
Application $application,
|
||||
SimpleControllerHelper $simpleControllerHelper,
|
||||
@@ -62,6 +67,9 @@ final class XmlExportController extends SimpleControllerBase
|
||||
private readonly PathsContext $pathsContext
|
||||
) {
|
||||
parent::__construct($application, $simpleControllerHelper);
|
||||
|
||||
$this->checks();
|
||||
$this->checkAccess(AclActionsInterface::CONFIG_BACKUP);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -132,22 +140,4 @@ final class XmlExportController extends SimpleControllerBase
|
||||
return $this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* initialize
|
||||
*
|
||||
* @throws SPException
|
||||
* @throws SessionTimeout
|
||||
*/
|
||||
protected function initialize(): void
|
||||
{
|
||||
try {
|
||||
$this->checks();
|
||||
$this->checkAccess(AclActionsInterface::CONFIG_BACKUP);
|
||||
} catch (UnauthorizedPageException $e) {
|
||||
$this->eventDispatcher->notify('exception', new Event($e));
|
||||
|
||||
$this->returnJsonResponseException($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user