X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F06_Authorization.pod;h=5ef7ac4bcf453fb953795e3ded42e7629119c0fa;hp=cb0d599b783bc1d0dad0a86c15b9eadea0241b1c;hb=959ce3943cd4e2afe02b93824a8da610f9ad10d7;hpb=477a6d5b13f55eb335979812080e4a11217f19d6 diff --git a/lib/Catalyst/Manual/Tutorial/06_Authorization.pod b/lib/Catalyst/Manual/Tutorial/06_Authorization.pod index cb0d599..5ef7ac4 100644 --- a/lib/Catalyst/Manual/Tutorial/06_Authorization.pod +++ b/lib/Catalyst/Manual/Tutorial/06_Authorization.pod @@ -193,7 +193,7 @@ message. Note that we intentionally chose to display the message this way to demonstrate that TT templates will not be used if the response body has already been set. In reality you would probably want to use a technique that maintains the visual continuity of your template layout -(for example, using L as shown in the +(for example, using L as shown in the L to redirect to an "unauthorized" page). @@ -303,6 +303,9 @@ match the following code: $c->detach('/error_noperms') unless $c->stash->{object}->delete_allowed_by($c->user->get_object); + # Saved the PK id for status_msg below + my $id = $c->stash->{object}->id; + # Use the book object saved by 'object' and delete it along # with related 'book_authors' entries $c->stash->{object}->delete;