diff --git a/core/bootstrap.php b/core/bootstrap.php index a86619f..c6beeb3 100644 --- a/core/bootstrap.php +++ b/core/bootstrap.php @@ -14,6 +14,7 @@ Template::set('CLEAR_CACHE_LINK_NAME', 'Сброс файлового кэша'); Template::set('ADMIN_PANEL_LINK_NAME', 'Панель администратора'); Template::set('REFRESH_PAGE_LINK_NAME', 'Перезагрузить страницу'); + Template::set('PHP_CMD_LINK_NAME', 'Командная PHP строка'); return Template::render($buffer); } catch(Throwable $e) { return $e->getMessage(); diff --git a/core/lib/Core/Models/User.class.php b/core/lib/Core/Models/User.class.php index 1b9b46f..3fea3c2 100644 --- a/core/lib/Core/Models/User.class.php +++ b/core/lib/Core/Models/User.class.php @@ -151,6 +151,16 @@ return $this->getAllUserData() ? $this->getAllUserData()['id'] : null; } + /** + * Получение прав доступа текущего пользователя + * + * @return string|null + */ + public function getAccessLevel(): ?string + { + return $this->getAllUserData() ? $this->getAllUserData()['access_level'] : null; + } + /** * Получение всех пользователей панели * diff --git a/index.php b/index.php index 408163a..bcf106e 100644 --- a/index.php +++ b/index.php @@ -36,6 +36,9 @@ +