[Catalyst] "Catalyst::Plugin::Authentication uses NEXT, which is deprecated."

Paul Makepeace paulm at paulm.com
Tue May 11 20:11:58 GMT 2010


On Sun, May 9, 2010 at 18:25, Paul Makepeace <paulm at paulm.com> wrote:
[snip to the most puzzling stuff]
> Finally, we have our roles via a join: user <-- user_role --> role. It
> seems like role_field is expecting a string but it's here getting an
> integer. Is there anyway of having go further into the role table with
> that integer key and compare on role.role?
>
> We used to use,
> __PACKAGE__->config->{authorization}->{dbic} = {
>  role_class           => 'DBIC_Readonly::Role',
>  role_field           => 'role',
>  role_rel             => 'map_user_role',            # DBIx::Class only
>  user_role_user_field => 'user',
> };
>
> Now,
> __PACKAGE__->config->{authentication} = {
>  default_realm => 'members',
>  realms => {
>    members => {
>      credential => {
>        class => 'Password',
>        password_field => 'password',
>        password_type => 'clear',
>      },
>      store => {
>        class => 'DBIx::Class',
>        user_model => 'DBIC_Readonly::User',
>        role_relation => 'map_user_role',
>        role_field => 'role',
>      },
>    },
>  },
> };
>
> with, (unchanged),
> User.pm,
> __PACKAGE__->has_many(map_user_role => 'IDL::Schema::UserRole' => 'user');

Anyone have an idea here? Any more info I can provide? I'm assuming
this isn't a functional regression but I'm at a loss what to do here.
I could change user_role to have strings instead of an FK to role but
would rather not as we lose some protection against bad role
names/data integrity.

Paul



More information about the Catalyst mailing list