[Catalyst] "no role configuration found" -- authorization: dbic and DBI::Schema::Loader

Ashley Pond V apv at sedition.com
Sun Dec 16 00:57:29 GMT 2007


Progressing… Looking at Catalyst/Plugin/Authentication/Store/DBIC/ 
User.pm I saw a couple of items in the "authentication" config I  
could set. With "role_relation" and "role_field" set--

authentication:
   default_realm: users
   realms:
     users:
       credential:
         class: Password
         password_field: password
         password_type: hashed
         password_hash_type: SHA-1
       store:
         class: DBIx::Class
         user_class: User
         role_relation: user_roles
         role_field: role

--I now get the roles checked but they are failing because they are  
checking (returning) the role "id" instead of the "name."

$c->user->roles returns a list of the IDs too. So, from reading this,
      Catalyst::Plugin::Authentication::Store::DBIx::Class::roles()
it looks like dynamic loader schemas are incompatible right now? I'm  
trying to figure this out but there is a lot of inter-related code to  
read, cross-package-configuration, and documentation drift/lag.

Throw me a bone, er, a line!
-Ashley


On Dec 15, 2007, at 10:18 AM, Ashley Pond V wrote:
> Can you elaborate? "map_user_role" ne "user_role." I have  
> "role_rel" set to the UserRole class. I tried adding "user_role"  
> but it didn't help and I don't see it anywhere in the docs.
>
> I should rephrase, I think. Is anyone using DBIC::Schema::Loader  
> dynamically with role authorization? If so, please share your  
> configuration or advise of which FMTR.
>
> Thanks again,
> -Ashley
>



More information about the Catalyst mailing list