1

I've tried use Authorization::Roles in my Catalyst app. Authentication works right but when I use $c->check_user_roles("admin"); it always returns false. What's wrong?

Some config:

store => {
    class => 'DBIx::Class',
    user_model => 'Mymodel::User',
    id_field => 'name',
    role_field => 'rolename', # in my table there is the same column
                             # name undoubtedly
}
edem
  • 3,222
  • 3
  • 19
  • 45

1 Answers1

3

If your roles are stored in the users table, use the role_column option. If your roles are stored in a separate table, use the role_relation and role_field options. role_field on its own isn't valid.

hobbs
  • 223,387
  • 19
  • 210
  • 288