Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Problem setting up authentication

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


wijnandatnedbsd.nl

Aug 22, 2005, 7:49 PM

Post #1 of 3 (181 views)
Permalink
Problem setting up authentication

Hi List,

I am trying to setup a application which uses authentication.
The table is serveradmin and I created a Scaffolding controller for it
too (will be limited as soon as the roles stuff works of course).
The other 2 tables are created too ( roles and userroles), but no
scaffolding there.

Config of lib/Jabbernet.pm
__PACKAGE__->config( authentication => { user_class =>
'Jabbernet::M::CDBI::Serveradmins',
user_field => 'username',
password_field => 'password',
role_class =>
'Jabbernet::M::CDBI::Roles',
user_role_class =>
'Jabbernet::M::CDBI::UserRoles',
user_role_user_field => 'user_id',
user_role_role_field => 'role_id',
});

The error I recieve is:
|Caught exception "Can't locate object method "search" via package
"Jabbernet::M::CDBI::Serveradmins" (perhaps you forgot to load
"Jabbernet::M::CDBI::Serveradmins"?) at
/usr/local/share/perl/5.8.7/Catalyst/Plugin/Authentication/CDBI.pm line 80."

I already googled, and found a reference to this list, but that was a
case of missing modules so it is not related.

Anyone a idea where to look now?
It should be something obvious, but I don't see it.

Wijnand
|


andyathybridized.org

Aug 22, 2005, 8:04 PM

Post #2 of 3 (180 views)
Permalink
Problem setting up authentication [In reply to]

Wijnand Wiersma wrote:
> The error I recieve is:
> |Caught exception "Can't locate object method "search" via package
> "Jabbernet::M::CDBI::Serveradmins" (perhaps you forgot to load
> "Jabbernet::M::CDBI::Serveradmins"?) at
> /usr/local/share/perl/5.8.7/Catalyst/Plugin/Authentication/CDBI.pm line
> 80."

If the table name is "serveradmin", you want to refer to the class as
Jabbernet::M::CDBI::Serveradmin. The plural form is only used for the
relationships. If you have Catalyst -Debug enabled, you will see the
names of your table classes when you launch the standalone server.

-Andy


wijnandatnedbsd.nl

Aug 22, 2005, 8:13 PM

Post #3 of 3 (194 views)
Permalink
Problem setting up authentication [In reply to]

Andy Grundman wrote:

> If the table name is "serveradmin", you want to refer to the class as
> Jabbernet::M::CDBI::Serveradmin. The plural form is only used for the
> relationships. If you have Catalyst -Debug enabled, you will see the
> names of your table classes when you launch the standalone server.
>
Argh, I knew I was missing something obvious. That little 's' tricked
me. This took me a few hours.
Thanks for pointing me in the right direction Andy.

Wijnand

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.