* [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:
nuxsmin
2018-10-23 00:56:05 +02:00
parent e322563a66
commit e49526e594
147 changed files with 2613 additions and 1751 deletions

View File

@@ -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);
}
}