<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="">&nbsp;<br style="" class="">Perhaps it's a stupid question, but have you checked that the user exists?<br style="" class="">&nbsp;<br style="" class=""><div id="yui_3_16_0_1_1423502609055_3828">if ( $c-&gt;user_exists() &amp;&amp; ...</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 &lt;fluca1978@infinito.it&gt; 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-&gt;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-&gt;check_any_user_role( qw/Admin Manutentore/ ) )<br><br>The configuration of the application is as follows:<br><br><br>__PACKAGE__-&gt;config('Plugin::<br>Authentication' =&gt; {<br>&nbsp; &nbsp; default_realm =&gt; 'members',<br>&nbsp; &nbsp; realms =&gt; {<br>&nbsp; &nbsp; &nbsp; &nbsp; members =&gt; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; credential =&gt; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; class =&gt; 'Password',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; password_field =&gt; 'password',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; password_type =&gt; 'clear'<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; },<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; store =&gt; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; class =&gt; 'DBIx::Class',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; user_model =&gt; 'SmicketsDB::User',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; role_relation =&gt; 'roles',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; role_field =&gt; 'description',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });<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>