On Sun, Apr 19, 2009 at 10:06:51AM +1000, [email protected] wrote:
>
> hi, all
>
> what's the best way to exclude static requests from needing the user
> to log in?
> Some parts of my site are open to general public. For example, the
> 'contact us', 'services portfolio' and so forth pages.
>
> At the moment, I have put in codes in my MyApp::Controller::Root->auto
> and it seems to want every request to be logged on.
Two options:
(1) (preferred) use Chained and have two root chain points, one that requires
login and one that doesn't
(2) sub static_serving_thing :NoLogin and check for
$c->action->attributes->{NoLogin} in your root auto
I'd suggest avoiding the ACL plugin; the implementation's a complete hack
and Chained effectively obsoletes it anyway.
--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/