diff options
Diffstat (limited to 'application/front/controller/admin/ShaarliAdminController.php')
-rw-r--r-- | application/front/controller/admin/ShaarliAdminController.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/application/front/controller/admin/ShaarliAdminController.php b/application/front/controller/admin/ShaarliAdminController.php new file mode 100644 index 00000000..ea703f62 --- /dev/null +++ b/application/front/controller/admin/ShaarliAdminController.php | |||
@@ -0,0 +1,21 @@ | |||
1 | <?php | ||
2 | |||
3 | declare(strict_types=1); | ||
4 | |||
5 | namespace Shaarli\Front\Controller\Admin; | ||
6 | |||
7 | use Shaarli\Container\ShaarliContainer; | ||
8 | use Shaarli\Front\Controller\Visitor\ShaarliVisitorController; | ||
9 | use Shaarli\Front\Exception\UnauthorizedException; | ||
10 | |||
11 | abstract class ShaarliAdminController extends ShaarliVisitorController | ||
12 | { | ||
13 | public function __construct(ShaarliContainer $container) | ||
14 | { | ||
15 | parent::__construct($container); | ||
16 | |||
17 | if (true !== $this->container->loginManager->isLoggedIn()) { | ||
18 | throw new UnauthorizedException(); | ||
19 | } | ||
20 | } | ||
21 | } | ||