<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px">Luca,<br style="" class=""> <br style="" class="">Perhaps it's a stupid question, but have you checked that the user exists?<br style="" class=""> <br style="" class=""><div id="yui_3_16_0_1_1423502609055_3828">if ( $c->user_exists() && ...</div><div id="yui_3_16_0_1_1423502609055_3816"><br></div><div id="yui_3_16_0_1_1423502609055_3829" dir="ltr">jb<br></div><div id="yui_3_16_0_1_1423502609055_3830"><span></span></div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font face="Arial" size="2"> On Monday, February 9, 2015 7:53 AM, Luca Ferrari <fluca1978@infinito.it> wrote:<br> </font> </div> <br><br> <div class="y_msg_container">Hi all,<br>I'm trying to setup the authorization in an application, and therefore<br>in my controller method I've something like the following:<br><br>if ( ! $c->check_any_user_role( qw/Admin Manutentore/ ) ){ .... }<br><br>and the above is always failing. At first I thought I was missing<br>something with the role configuration, but in my application I also<br>use ACLS that to the same path are configured as follows (and do<br>work):<br><br>if ( ! $c->check_any_user_role( qw/Admin Manutentore/ ) )<br><br>The configuration of the application is as follows:<br><br><br>__PACKAGE__->config('Plugin::<br>Authentication' => {<br> default_realm => 'members',<br> realms => {<br> members => {<br> credential => {<br> class => 'Password',<br> password_field => 'password',<br> password_type => 'clear'<br> },<br> store => {<br> class => 'DBIx::Class',<br> user_model => 'SmicketsDB::User',<br> role_relation => 'roles',<br> role_field => 'description',<br> }<br> }<br> }<br> });<br><br><br>Any idea about?<br><br>Thanks,<br>Luca<br><br>_______________________________________________<br>List: <a ymailto="mailto:Catalyst@lists.scsys.co.uk" href="mailto:Catalyst@lists.scsys.co.uk">Catalyst@lists.scsys.co.uk</a><br>Listinfo: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst</a><br>Searchable archive: <a href="http://www.mail-archive.com/catalyst@lists.scsys.co.uk/" target="_blank">http://www.mail-archive.com/catalyst@lists.scsys.co.uk/</a><br>Dev site: <a href="http://dev.catalyst.perl.org/" target="_blank">http://dev.catalyst.perl.org/</a><br><br><br></div> </div> </div> </div> </div></body></html>