<html><body><div style="font-family: trebuchet ms,sans-serif; font-size: 10pt; color: #330099"><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks it did work!<br></div><div><br></div><div><br data-mce-bogus="1"></div><div>and Thanks again for replying so soon!<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Kind Regards<br data-mce-bogus="1"></div><div>Rajesh Mallah.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>============================<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>lib/MyProj/Schema/Result/MyProjUser.pm<br data-mce-bogus="1"></div><div><br>sub myrolecol {<br><br> my ($self) = @_;<br><br> my $log = Log::Log4perl->get_logger();<br> $log -> debug ("myrolecol has been called!");<br> return "thisrole|testrole";<br><br>}<br><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>============================================<br data-mce-bogus="1"></div><div><br><br>__PACKAGE__->config->{'Plugin::Authentication'} =<br>{ <br> default => {<br> class => 'SimpleDB',<br> user_model => 'DB::MyProjectUser',<br> password_type => 'self_check',<br> role_column => 'myrolecol'<br> }<br>} ;<br><br>===========================================<br><br></div><div>the reason i was not able to get it was , I was using 'role_field'</div><div data-marker="__SIG_PRE__">instead of 'role_column'<br></div><div data-marker="__SIG_PRE__"><br data-mce-bogus="1"></div><div data-marker="__SIG_PRE__"><br>Regds<br><br>Rajesh Kumar Mallah.<br>Redgrape Technologies ( https://www.redgrape.tech )<br>Mobile: 09811255597, Land: 011-49044122 <br>----------------------------------------------------------------------------------------------------------<br>Opportunities are usually disguised as hard work, so most people don't recognize them<br>----------------------------------------------------------------------------------------------------------</div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Will Crawford" <billcrawford1970@gmail.com><br><b>To: </b>"Catalyst" <catalyst@lists.scsys.co.uk><br><b>Sent: </b>Monday, November 13, 2017 9:25:58 PM<br><b>Subject: </b>Re: [Catalyst] catalyst authorization , self_check<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">On 13 November 2017 at 15:21, Rajesh Mallah <mallah@redgrape.tech> wrote:</blockquote><br>|> Hi ,<br>|><br>|> the roles of my users cannot be represented in a table column<br>|> for a separate relation . It involves some logic that can be put<br>|> in a subroutine/method of my DBIx::Class schema object<br>|> representing the user.<br><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">[...]</blockquote><br>|> i have implemented the 'check_password' in MyProjectUser.pm<br>|> and it works well. What i need is similar flexibility to specify the<br>|> roles of an existing user . I cannot use role_field , role_relation<br><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><br>Just use role_column!<br><br>Giving the name of your subroutine/method as role_column, and making<br>sure it returns a suitable space- or comma-separated list of role<br>names, should be sufficient (a quick check of the code in<br>Catalyst::Authentication::Store::DBIx::Class::User shows it just calls<br>the method if it exists, it doesn't actually need to be a column<br>accessor).<br><br>Waiting to be proven wrong if there's code anywhere else checking that<br>it's actually a column ... :o)<br><br>_______________________________________________<br>List: Catalyst@lists.scsys.co.uk<br>Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/<br>Dev site: http://dev.catalyst.perl.org/<br><br></blockquote></div></div></body></html>