complete Manage Pseudo Devices

This commit is contained in:
Oliver Gorwits
2013-05-06 22:01:13 +01:00
parent 024f4d9a83
commit 9690a31f19
6 changed files with 72 additions and 1 deletions

View File

@@ -5,6 +5,12 @@ use Dancer ':syntax';
get '/admin/*' => sub {
my ($tag) = splat;
if (! var('user')->admin) {
status(302);
header(Location => uri_for('/')->path_query());
return;
}
# trick the ajax into working as if this were a tabbed page
params->{tab} = $tag;