diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-08-13 11:08:13 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-08-13 11:08:13 +0200 |
commit | bedbb845eec20363b928b424143787dbe988eefe (patch) | |
tree | 6b835ca247e39157b333323a539dde3c410c08f5 /application/front/controller/visitor | |
parent | 1a68ae5a29bc33ab80c9cfbe043cb1213551533c (diff) | |
download | Shaarli-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/visitor')
-rw-r--r-- | application/front/controller/visitor/PublicSessionFilterController.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/application/front/controller/visitor/PublicSessionFilterController.php b/application/front/controller/visitor/PublicSessionFilterController.php index 35da0c5f..1a66362d 100644 --- a/application/front/controller/visitor/PublicSessionFilterController.php +++ b/application/front/controller/visitor/PublicSessionFilterController.php | |||
@@ -30,4 +30,17 @@ class PublicSessionFilterController extends ShaarliVisitorController | |||
30 | 30 | ||
31 | return $this->redirectFromReferer($request, $response, ['linksperpage'], ['nb']); | 31 | return $this->redirectFromReferer($request, $response, ['linksperpage'], ['nb']); |
32 | } | 32 | } |
33 | |||
34 | /** | ||
35 | * GET /untagged-only: allows to display only bookmarks without any tag | ||
36 | */ | ||
37 | public function untaggedOnly(Request $request, Response $response): Response | ||
38 | { | ||
39 | $this->container->sessionManager->setSessionParameter( | ||
40 | SessionManager::KEY_UNTAGGED_ONLY, | ||
41 | empty($this->container->sessionManager->getSessionParameter(SessionManager::KEY_UNTAGGED_ONLY)) | ||
42 | ); | ||
43 | |||
44 | return $this->redirectFromReferer($request, $response, ['untaggedonly', 'untagged-only']); | ||
45 | } | ||
33 | } | 46 | } |