40 |
# able to edit files in place. These should become a plugin of some |
# able to edit files in place. These should become a plugin of some |
41 |
# sort, when we have that infrastructure. |
# sort, when we have that infrastructure. |
42 |
|
|
43 |
before '*', run { |
before qr'^(.*)$', run { |
44 |
Jifty->api->allow(qr/^Jifty::Action::Devel/) |
my $url = $1 || '/'; |
45 |
|
|
46 |
|
Jifty->api->allow(qr/^Jifty::Action::Devel/) |
47 |
if Jifty->config->framework('DevelMode'); |
if Jifty->config->framework('DevelMode'); |
48 |
|
|
49 |
|
return if ($url eq '/' || $url =~ m#^/login#); |
50 |
|
|
51 |
|
if (not Jifty->web->current_user->id) { |
52 |
|
redirect( '/login' . $url ); |
53 |
|
} |
54 |
}; |
}; |
55 |
|
|
56 |
on qr'^/__jifty/edit/(.*?)/(.*)$', run { |
on qr'^/__jifty/edit/(.*?)/(.*)$', run { |