[Catalyst] question about authorization and roles
Luca Ferrari
fluca1978 at infinito.it
Mon Feb 9 13:53:16 GMT 2015
Hi all,
I'm trying to setup the authorization in an application, and therefore
in my controller method I've something like the following:
if ( ! $c->check_any_user_role( qw/Admin Manutentore/ ) ){ .... }
and the above is always failing. At first I thought I was missing
something with the role configuration, but in my application I also
use ACLS that to the same path are configured as follows (and do
work):
if ( ! $c->check_any_user_role( qw/Admin Manutentore/ ) )
The configuration of the application is as follows:
__PACKAGE__->config('Plugin::
Authentication' => {
default_realm => 'members',
realms => {
members => {
credential => {
class => 'Password',
password_field => 'password',
password_type => 'clear'
},
store => {
class => 'DBIx::Class',
user_model => 'SmicketsDB::User',
role_relation => 'roles',
role_field => 'description',
}
}
}
});
Any idea about?
Thanks,
Luca
More information about the Catalyst
mailing list