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
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
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
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/