[Catalyst] Question about Chained Controller
Charlie Garrison
garrison at zeta.org.au
Mon Nov 15 22:40:14 GMT 2010
Good morning,
On 15/11/10 at 2:53 PM -0200, Eden Cardim <edencardim at gmail.com> wrote:
>>>>>> "Charlie" == Charlie Garrison <garrison at zeta.org.au> writes:
>
>Charlie> I've never bothered to find out why, but I've run into
>Charlie> situations where $c->user_exists returns true and $c->user
>Charlie> returns false. I just check for defined($c->user) instead
>Charlie> and that solved it for me.
>
>Probably a mangled session?
Could be. I found a problem with my browser changing session
cookie value to old/expired value after two requests. The
user_exists problem was probably before I finally debugged the
browser problem. FYI, the browser (OmniWeb) devs have
acknowledged my bug report but have been unable to reproduce the
problem (& fix it).
>Charlie> I also agree with other users that auto is a better place
>Charlie> to do that check.
>
>Chaining is a lot more powerful because it allows you to distribute
>responsibilities hierarchically throughout several actions:
I use a :AuthRequired method attribute and check for that in
auto method. Is there anything inherently wrong with that
method? I got the technique from someone on this list a while back.
Charlie
--
Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠 http://www.ietf.org/rfc/rfc1855.txt
More information about the Catalyst
mailing list