MyShaarli/application/front/controller/admin/ShaarliAdminController.php
ArthurHoaro 2899ebb5b5 Initialize admin Slim controllers
- Reorganize visitor controllers
  - Fix redirection with Slim's requests base path
  - Fix daily links
2020-07-23 21:19:21 +02:00

21 lines
547 B
PHP

<?php
declare(strict_types=1);
namespace Shaarli\Front\Controller\Admin;
use Shaarli\Container\ShaarliContainer;
use Shaarli\Front\Controller\Visitor\ShaarliVisitorController;
use Shaarli\Front\Exception\UnauthorizedException;
abstract class ShaarliAdminController extends ShaarliVisitorController
{
public function __construct(ShaarliContainer $container)
{
parent::__construct($container);
if (true !== $this->container->loginManager->isLoggedIn()) {
throw new UnauthorizedException();
}
}
}