Create a groups table (Group model) and specify a Member.group_id in
your condition (add group_id to members table, of course).

If that won't cut it, you might want to look into using separate
models as subclasses of Member. Look for InheritableBehavior, which
will allow you to do that.

I recommend trying to work with the first option, though.

On Sat, Feb 14, 2009 at 9:26 PM, Christian <[email protected]> wrote:
>
> Hi,
>
> I am writing a project in which users belong to different groups and
> depending on the group they belong to they can see other members in
> their own groups, but not in others. I really have no idea how to
> setup my models so that when I do a find('all') I get all the members
> that belong to the user's own group. I know I can do it like adding it
> as a condition, but thing is each group has a lot of stuff that only
> belongs to each group, and having to write that condition every single
> time will turn into  a pain. Is there another way? I use the auth
> component, but not ACL. I don't really wanna use ACL.
>
>
> Christian
>
> P.S.
>
> Thanks in advance.
> >
>

--~--~---------~--~----~------------~-------~--~----~
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