Don't drink and Perl kids
This commit is contained in:
parent
5cce06c984
commit
270f0df12d
|
@ -58,14 +58,6 @@ sub startup($self) {
|
||||||
return undef;
|
return undef;
|
||||||
});
|
});
|
||||||
|
|
||||||
$self->helper(is_admin => sub ($c) {
|
|
||||||
if (my $admin_id = $c->session->{'admin_id'}) {
|
|
||||||
return 1 if $admin_id =~ /\d+/
|
|
||||||
}
|
|
||||||
|
|
||||||
return undef;
|
|
||||||
});
|
|
||||||
|
|
||||||
# Finish configuring some things
|
# Finish configuring some things
|
||||||
$self->secrets($self->config->{'secrets'}) || die $@;
|
$self->secrets($self->config->{'secrets'}) || die $@;
|
||||||
|
|
||||||
|
@ -192,12 +184,7 @@ sub startup($self) {
|
||||||
->to('moderator#unhide_remark')
|
->to('moderator#unhide_remark')
|
||||||
->name('unhide_remark');
|
->name('unhide_remark');
|
||||||
|
|
||||||
my $admin = $moderator->under('/admin', sub ($c) {
|
# under() for admins
|
||||||
return 1 if $c->is_admin;
|
|
||||||
|
|
||||||
# Return undef otherwise a body is rendered with the redirect...
|
|
||||||
return $c->recirect_to('mod_login'), undef;
|
|
||||||
});
|
|
||||||
|
|
||||||
# Actions to create mods...
|
# Actions to create mods...
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user