Hi,
I am trying to get role based authorization going in my catalyst app. However,
I'm encountering difficultly on what should be an easy task.
My database basically has four tables for users
User - Main User data with foren keys to User Account(has many) and UserToRole
(has many)
UserAccount - Data to store account login type (ie openid, facebook etc)
UserToRole - Linkage table from user to user role
UserRole - table with the role names.
My Package config looks like:
__PACKAGE__->config
( name => "Signup::Web",
"Plugin::Authentication" => {
default_realm => "facebook",
realms => {
facebook =>{
credential =>{
class => "FBConnect",
api_key =>
__PACKAGE__->config->{facebookConnect}->{api_key},
secret =>
__PACKAGE__->config->{facebookConnect}->{secret},
app_name =>
__PACKAGE__->config->{facebookConnect}->{app_name}
},
store => {
class => 'DBIx::Class',
user_model => 'MyApp::User',
role_relation => 'user_to_roles',
role_field => 'title'
}
},
... more auth types
});
When I try and run my program I get
Failed to load user data. You passed [ARRAY(0x39a8964)] to authenticate() but
your user source (MyApp::User) only has these columns:
[id,alias,name_first,name_last,email] Check your authenticate() call.
Any idea on how I can load the roles?
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/