Changeset 1c6e8d1ac50e0b9c3fa59ce2d61b8d74e49235b3

Show
Ignore:
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:
2 added
1 modified

Legend:

Unmodified
Added
Removed
  • lib/GMS/Web/Controller/Root.pm

    reacc85e r1c6e8d1  
    3636sub default :Path { 
    3737    my ( $self, $c ) = @_; 
    38     $c->response->body( 'Page not found' ); 
     38    $c->stash->{template} = 'error/404.tt'; 
    3939    $c->response->status(404); 
     40} 
     41 
     42sub forbidden :Path :Args(0) { 
     43    my ($self, $c) = @_; 
     44    $c->stash->{template} = 'error/403.tt'; 
     45    $c->response->status(403); 
    4046} 
    4147