1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 14:16:46 +02:00

Version 1.3.8: ACL Integration

This commit is contained in:
trendschau
2020-07-11 20:28:27 +02:00
parent 7d994c2230
commit 4f80e07810
44 changed files with 1033 additions and 576 deletions

View File

@@ -8,6 +8,7 @@ class TwigUserExtension extends \Twig_Extension
{
return [
new \Twig_SimpleFunction('is_role', array($this, 'isRole' )),
new \Twig_SimpleFunction('get_role', array($this, 'getRole' )),
new \Twig_SimpleFunction('get_username', array($this, 'getUsername' ))
];
}
@@ -21,6 +22,15 @@ class TwigUserExtension extends \Twig_Extension
return false;
}
public function getRole()
{
if(isset($_SESSION['role']))
{
return $_SESSION['role'];
}
return false;
}
public function getUsername()
{