[Catalyst] question about authorization and roles

Luca Ferrari fluca1978 at infinito.it
Wed Feb 11 11:30:46 GMT 2015


On Tue, Feb 10, 2015 at 9:26 AM, Dmitry L. <dim0xff at gmail.com> wrote:
> What do you get in debug console output?
> By code (Catalyst::Plugin::Authorization::Roles) you have to see
> something like this:
> Role denied: @roles
>

This is what appears in the debug console:

[debug] Path is "tickets/list"
[debug] Found sessionid "382d4de8c7ec3a66712bf2f6b3c09bea1b180235" in cookie
[debug] Restored session "382d4de8c7ec3a66712bf2f6b3c09bea1b180235"
[debug] "GET" request for "tickets/list" from "192.168.200.1"
[debug] running ACL rule CODE(0x2b93a488) defined at
/mnt/ada1a/sviluppo/Perl/Smickets/script/../lib/Smickets.pm line 85 on
tickets/list
[debug] Form (tickets/list): Looking for config file tickets/list.fb
[debug] Form (tickets/list): Found form config
/mnt/ada1a/sviluppo/Perl/Smickets/root/forms/tickets/list.fb
[debug] Rendering template "tickets/list.tt2"



please note that in my application config I've an ACL entry as follows:

_PACKAGE__->allow_access_if_any( '/tickets', [ qw/Admin Manutentore/ ] );

I don't know if this is interfering with the test I'm performing, but
the result is that even if the user has the "manutentore" role it is
not evaluated as such.

Any idea?

Thanks,
Luca



More information about the Catalyst mailing list