Skip Menu |

This queue is for tickets about the Catalyst-Manual CPAN distribution.

Report information
The Basics
Id: 46664
Status: rejected
Priority: 0/
Queue: Catalyst-Manual

People
Owner: Nobody in particular
Requestors: 2009 [...] denny.me
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 5.8000
Fixed in: (no value)



Subject: Possible error in Catalyst::Manual::Tutorial re: roles
http://search.cpan.org/~hkclark/Catalyst-Manual-5.8000/lib/Catalyst/Manual/Tutorial/05_Authentication.pod#Add_Users_and_Roles_to_the_Database tells you to create a user_roles tables with ('user_id', 'role_id'). http://search.cpan.org/~hkclark/Catalyst-Manual-5.8000/lib/Catalyst/Manual/Tutorial/06_Authorization.pod#Add_Role-Specific_Logic_to_the_"Book_List"_Template shows you a quick way to dump out those roles. However, it fails with this error message: [error] Couldn't render template "undef error - Reactant::Schema::Result::User::roles(): search_related: result source 'UserRole' has no such relationship role at /usr/local/share/perl/5.10.0/Catalyst/Authentication/Store/DBIx/Class/User.pm line 136 I fixed this in my app by changing user_roles to be ('user','role'). I'm not sure whether this is the correct solution, or whether the template should be constructed differently instead, or indeed whether the problem was introduced by my other code (I'm not following the tutorial exactly, but I think I was close to literal on this section). Feel free to grab me on irc ('denny') or email me if this doesn't make sense, I'll try to explain further. Regards, Denny
I couldn't recreate this... let me know if I'm missing something, but for now I'll mark it rejected. Thanks.