aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/admin/ShaarliAdminController.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-08-13 11:08:13 +0200
committerArthurHoaro <arthur@hoa.ro>2020-08-13 11:08:13 +0200
commitbedbb845eec20363b928b424143787dbe988eefe (patch)
tree6b835ca247e39157b333323a539dde3c410c08f5 /application/front/controller/admin/ShaarliAdminController.php
parent1a68ae5a29bc33ab80c9cfbe043cb1213551533c (diff)
downloadShaarli-bedbb845eec20363b928b424143787dbe988eefe.tar.gz
Shaarli-bedbb845eec20363b928b424143787dbe988eefe.tar.zst
Shaarli-bedbb845eec20363b928b424143787dbe988eefe.zip
Move all admin controller into a dedicated group
Also handle authentication check in a new middleware for the admin group.
Diffstat (limited to 'application/front/controller/admin/ShaarliAdminController.php')
-rw-r--r--application/front/controller/admin/ShaarliAdminController.php9
1 files changed, 0 insertions, 9 deletions
diff --git a/application/front/controller/admin/ShaarliAdminController.php b/application/front/controller/admin/ShaarliAdminController.php
index 3bc5bb6b..3b5939bb 100644
--- a/application/front/controller/admin/ShaarliAdminController.php
+++ b/application/front/controller/admin/ShaarliAdminController.php
@@ -22,15 +22,6 @@ use Slim\Http\Request;
22 */ 22 */
23abstract class ShaarliAdminController extends ShaarliVisitorController 23abstract class ShaarliAdminController extends ShaarliVisitorController
24{ 24{
25 public function __construct(ShaarliContainer $container)
26 {
27 parent::__construct($container);
28
29 if (true !== $this->container->loginManager->isLoggedIn()) {
30 throw new UnauthorizedException();
31 }
32 }
33
34 /** 25 /**
35 * Any persistent action to the config or data store must check the XSRF token validity. 26 * Any persistent action to the config or data store must check the XSRF token validity.
36 */ 27 */