From f7bfdf58def6aadc922e1632f407d1418269a0d7 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 9 Jul 2022 19:40:17 +0300 Subject: initial --- handler/admin/AdminRequestHandler.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 handler/admin/AdminRequestHandler.php (limited to 'handler/admin/AdminRequestHandler.php') diff --git a/handler/admin/AdminRequestHandler.php b/handler/admin/AdminRequestHandler.php new file mode 100644 index 0000000..04b7cde --- /dev/null +++ b/handler/admin/AdminRequestHandler.php @@ -0,0 +1,20 @@ +skin->static[] = '/css/admin.css'; + $this->skin->static[] = '/js/admin.js'; + + if (!($this instanceof Login) && !admin::isAdmin()) + throw new \ForbiddenException('looks like you are not admin'); + + return null; + } + +} \ No newline at end of file -- cgit v1.2.3