Changeset 1c6e8d1ac50e0b9c3fa59ce2d61b8d74e49235b3
- Timestamp:
- 12/06/09 15:53:57 (9 months ago)
- Author:
- Stephen Bennett <spb@…>
- Parents:
- 60a55516fee8adb94bfd6ea006f91c9d2978b652
- Children:
- 31bf8409057e2901b16a35810545682a2fbf8c31
- git-committer:
- Stephen Bennett <spb@exherbo.org> / 2009-12-06T15:53:57Z+0000
- Message:
-
Add a /forbidden location, to be used when the logged in user lacks access to a given page. Also make the default 'Page not found' handler a bit nicer.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
reacc85e
|
r1c6e8d1
|
|
| 36 | 36 | sub default :Path { |
| 37 | 37 | my ( $self, $c ) = @_; |
| 38 | | $c->response->body( 'Page not found' ); |
| | 38 | $c->stash->{template} = 'error/404.tt'; |
| 39 | 39 | $c->response->status(404); |
| | 40 | } |
| | 41 | |
| | 42 | sub forbidden :Path :Args(0) { |
| | 43 | my ($self, $c) = @_; |
| | 44 | $c->stash->{template} = 'error/403.tt'; |
| | 45 | $c->response->status(403); |
| 40 | 46 | } |
| 41 | 47 | |