diff --git a/cp/bootstrap/app.php b/cp/bootstrap/app.php index 2f066fd..8162c7c 100644 --- a/cp/bootstrap/app.php +++ b/cp/bootstrap/app.php @@ -106,12 +106,15 @@ $container->set('view', function ($container) use ($translations, $uiLang, $lang ]); $view->getEnvironment()->addGlobal('uiLang', $uiLang); $view->getEnvironment()->addGlobal('lang', $lang); - $view->getEnvironment()->addGlobal('flash', $container->get('flash')); + $view->getEnvironment()->addGlobal('flash', $container->get('flash')); if (isset($_SESSION['_screen_mode'])) { $view->getEnvironment()->addGlobal('screen_mode', $_SESSION['_screen_mode']); } else { $view->getEnvironment()->addGlobal('screen_mode', 'light'); } + if (isset($_SESSION['auth_roles'])) { + $view->getEnvironment()->addGlobal('roles', $_SESSION['auth_roles']); + } $db = $container->get('db'); $query = 'SELECT r.currency, ru.registrar_id diff --git a/cp/resources/views/layouts/app.twig b/cp/resources/views/layouts/app.twig index d96d989..0e2ff6a 100644 --- a/cp/resources/views/layouts/app.twig +++ b/cp/resources/views/layouts/app.twig @@ -144,7 +144,7 @@ -