Yes, you'd need a join table for your HABTM with id, user_id, game_id
*and* role_id

I briefly explain how cake deals with the join table/model here:
http://teknoid.wordpress.com/2008/07/03/notes-on-cakephp-habtm-part-1-the-basics/

In addition to Mariano's post, it should be good to get you going.

On Sep 4, 10:38 pm, Adrian <[EMAIL PROTECTED]> wrote:
> I have 3 models
>
> User
> Role
> Game
>
> A User can belong to one or more Games.
> A Game has one or more Users.
> A User has a Role within each Game.
>
> It's that third association that's escaping me. I think the simplest
> way would be to create a 1:1:1 from User:Role:Game and then and a
> HABTM from User to Game. Am I off here?
>
> This is all in preparation to set up an ACL. Where,  depending on a
> User's Role within a Game, the User can edit, or not,  records
> belonging to that particular game. In other words if User A has GM
> Role in Game X, then the A can edit records relating to X. However A
> only has Player Role in Game Y and can view but not edit records
> relating to Y.
>
> Is my original way of thinking about this correct or is there a better
> way to accomplish this through Cake?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to