Fix the is_admin helper
This commit is contained in:
parent
33e38e26f6
commit
65d98d594c
|
@ -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 $@;
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<h1>Post::Text</h1>
|
||||
<nav>
|
||||
<div>
|
||||
<span>Navigate:</span>
|
||||
<%= link_to List => 'threads_list' %>
|
||||
<%= link_to New => 'post_thread' %>
|
||||
<% unless (is_mod) { =%>
|
||||
|
@ -24,7 +23,7 @@
|
|||
<% } =%>
|
||||
</div>
|
||||
<div>
|
||||
<% if (is_mod && session->{'is_admin'}) { =%>
|
||||
<% if (is_mod && is_admin) { =%>
|
||||
<span>Admin:</span>
|
||||
<%= link_to Create => 'create_mod' %>
|
||||
<% } =%>
|
||||
|
|
Loading…
Reference in New Issue
Block a user