From 65d98d594c689656f54987d8aa17cbbae924c339 Mon Sep 17 00:00:00 2001 From: swag Date: Sun, 16 Apr 2023 15:15:39 -0400 Subject: [PATCH] Fix the is_admin helper --- lib/PostText.pm | 4 ++++ templates/layouts/default.html.ep | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/PostText.pm b/lib/PostText.pm index 610071a..d411b01 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -58,6 +58,10 @@ sub startup($self) { return undef; }); + $self->helper(is_admin => sub ($c) { + $c->session->{'is_admin'} || undef + }); + # Finish configuring some things $self->secrets($self->config->{'secrets'}) || die $@; diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep index c708e93..12f3f1f 100644 --- a/templates/layouts/default.html.ep +++ b/templates/layouts/default.html.ep @@ -8,7 +8,6 @@

Post::Text