From 9e217d87c095170460a8580d5215ddf7cbe639f4 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 2 Sep 2018 02:09:56 +0200 Subject: Template refactoring to use twig --- src/Renderer/Twig/Extensions/Authentication.php | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/Renderer/Twig/Extensions/Authentication.php (limited to 'src/Renderer/Twig/Extensions/Authentication.php') diff --git a/src/Renderer/Twig/Extensions/Authentication.php b/src/Renderer/Twig/Extensions/Authentication.php new file mode 100644 index 00000000..6a72d825 --- /dev/null +++ b/src/Renderer/Twig/Extensions/Authentication.php @@ -0,0 +1,40 @@ +isAuthenticated(); + } + + public function checkAuth($privilege) + { + global $privileges; + + return in_array($privilege, $privileges); + } +} -- cgit v1.2.3-54-g00ecf