On 13 November 2017 at 15:21, Rajesh Mallah <mal...@redgrape.tech> wrote:
> Hi  ,
>
> the roles of my users cannot be represented in a table column
> for a separate relation . It involves some logic that can be put
> in a subroutine/method of my DBIx::Class schema object
> representing the user.
[...]
> i have implemented the 'check_password' in MyProjectUser.pm
> and it works well. What i need is similar flexibility to specify the
> roles of an existing user . I cannot use role_field ,   role_relation

Just use role_column!

Giving the name of your subroutine/method as role_column, and making
sure it returns a suitable space- or comma-separated list of role
names, should be sufficient (a quick check of the code in
Catalyst::Authentication::Store::DBIx::Class::User shows it just calls
the method if it exists, it doesn't actually need to be a column
accessor).

Waiting to be proven wrong if there's code anywhere else checking that
it's actually a column ... :o)

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

Reply via email to