[Catalyst] Why no extra attributes on Private actions?
Bill Moseley
moseley at hank.org
Tue Jan 22 18:27:34 GMT 2008
On Tue, Jan 22, 2008 at 11:44:39AM -0600, Jonathan Rockway wrote:
>
> On Tue, 2008-01-22 at 09:29 -0800, Bill Moseley wrote:
> > This came up because I'm using "SSL" to indicate actions that require
> > SSL:
> >
> > sub secret : Local SSL {}
> >
> >
> > But, it would also be handy to be able to protect all actions below
> > a give controller via:
> >
> > sub auto : Private SSL { 1 }
>
>
> I don't think this is a great idea, but if you insist, feel free to
> override register_actions. (Personally I would use the ACL plugin to
> implement the "only dispatchable to if SSL" logic.)
I should know better to provide context with the question as then I
get an answer to the context instead of the question. ;)
Yes, perhaps the ACL plug is a better approach, but I'm curious why no
other attributes are allowed with Private -- what problem does that
bit of code I quoted solve?
BTW -- what specifically did you think of when you said you don't
think it's a great idea? Just that personally you would do it a
different way or that it was a fragile approach and if so in what way?
--
Bill Moseley
moseley at hank.org
More information about the Catalyst
mailing list