[Catalyst] Customizing Authentication/Roles

Matt S Trout dbix-class at trout.me.uk
Wed Sep 13 03:05:55 CEST 2006


Christopher H. Laco wrote:
> As I start laying out the framework for Mango, one of the things I want
> to do is use roles on a virtual 'per site' basis; within the same cat app.
> 
> From a table standpoint, that is roughly:
> 
>     sites:
>         id, name
> 
>     users
>         id, username, password
> 
>     roles
>         id, site_id, name
> 
>     users_roles
>         site_id, user_id, role_id
> 
> When a user logs in, they may have different roles for different sites.
> Maybe they're an admin for one site, but only a publisher for another.
> Two sites maybe have the same role name, which means the stock ROles
> stuffs in Auth isn't going to cut it.
> 
> I want to reuse as much of what exists as possible from Auth/Roles, but
> I haven't a clue on what direction to start making changes.
> 
> Any ideas on how you would do this?

Multiple site instances.

See Dave Kamholz (ningu)'s branch.

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list