Luca,
 
Perhaps it's a stupid question, but have you checked that the user exists?
 
if ( $c->user_exists() && ...
jb
 

     On Monday, February 9, 2015 7:53 AM, Luca Ferrari <[email protected]> 
wrote:
   

 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: [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/


   
_______________________________________________
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/

Reply via email to