mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-06 16:36:59 +01:00
* [MOD] Improved template rendering
* [MOD] Improved variable errors on templates * [MOD] Improved security token behavior * [MOD] Code refactoring Signed-off-by: nuxsmin <nuxsmin@syspass.org>
This commit is contained in:
@@ -42,6 +42,10 @@ abstract class SimpleControllerBase
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
protected $dic;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $previousSk;
|
||||
|
||||
/**
|
||||
* SimpleControllerBase constructor.
|
||||
@@ -59,6 +63,8 @@ abstract class SimpleControllerBase
|
||||
|
||||
$this->setUp($container);
|
||||
|
||||
$this->previousSk = $this->session->getSecurityKey();
|
||||
|
||||
if (method_exists($this, 'initialize')) {
|
||||
$this->initialize();
|
||||
}
|
||||
@@ -90,7 +96,9 @@ abstract class SimpleControllerBase
|
||||
*/
|
||||
protected function checkAccess($action)
|
||||
{
|
||||
if (!$this->session->getUserData()->getIsAdminApp() && !$this->acl->checkUserAccess($action)) {
|
||||
if (!$this->session->getUserData()->getIsAdminApp()
|
||||
&& !$this->acl->checkUserAccess($action)
|
||||
) {
|
||||
throw new UnauthorizedPageException(UnauthorizedPageException::INFO);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user