Bicycle/App/Controller/Admin/AdminController.php
Egor Isaev 858e574e60 dev
2026-08-06 15:45:09 +03:00

33 lines
993 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/**
* @package Bicycle
* @author Egor Isaev
* @description AdminController.php
* @copyright (c) 24/06/2026
*/
namespace App\Controller\Admin;
use System\Classes\Controller;
use System\Classes\HTTP\HTTPException;
/**
* Базовый контроллер админки. Рендерится в общем layout сайта
* (App/view/layout.html), своего отдельного шаблона не имеет.
* Конкретные страницы (Logs и т.п.) наследуют его.
*/
abstract class AdminController extends Controller
{
/**
* Точка для проверки прав администратора.
*
* @return void
* @throws HTTPException
*/
protected function before(): void
{
parent::before(); // авто-CSRF на небезопасных методах
// TODO: проверка прав администратора, когда появится логин.
}
}