21 lines
483 B
PHP
21 lines
483 B
PHP
<?php
|
|
|
|
namespace handler\admin;
|
|
|
|
use admin;
|
|
use exceptions\ForbiddenException;
|
|
use Response;
|
|
|
|
class AdminRequestHandler extends \RequestHandler {
|
|
|
|
public function beforeDispatch(): ?Response {
|
|
$this->skin->static[] = 'css/admin.css';
|
|
$this->skin->static[] = 'js/admin.js';
|
|
|
|
if (!($this instanceof LoginHandler) && !admin::isAdmin())
|
|
throw new ForbiddenException('These aren\'t the pages you\'re looking for...');
|
|
|
|
return null;
|
|
}
|
|
|
|
} |