[Catalyst] Acl and Class::C3
Yuval Kogman
nothingmuch at woobling.org
Wed Jan 25 19:54:13 CET 2006
On Wed, Jan 25, 2006 at 18:05:12 +0100, Kiefer, Sascha wrote:
> 2. I added ACL like this:
> __PACKAGE__->deny_access_unless('/', sub { 0 } );
> __PACKAGE__->allow_access_if('/login', sub { 1 } );
>
> I get the error:
> | /login | /authen/login
...
> [Wed Jan 25 17:54:13 2006] [catalyst] [info] MyApp powered by Catalyst 5.63
> The path '/login' does not exist (traversal hit a dead end at: ) at
This is because /login is the public path and /authen/login is the
private path - the ACL plugin works only with private paths (based
on the namespace, not the URL).
> __PACKAGE__->allow_access_if('/authen/login', sub { 1 } );
>
> It compiles, but then, when i access
See above
> /
> /login
> /authen/login
>
> I always see the catalyst-debug-screen and the debug log looks like this:
That's because the ACL engine throws an error when access is denied.
You need to handle this error, see the documentation.
--
() Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418 perl hacker &
/\ kung foo master: /me kicks %s on the nose: neeyah!!!!!!!!!!!!!!!!!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20060125/2f3c4fe1/attachment.pgp
More information about the Catalyst
mailing list