I got a system here where I need different users to be able to see
different sets of things.

So the simple setup at first is users in one specific group are the
admins and can see all things, so the ThingController just checks to see
if the user is in that group and its all good.

Besides admins there are standard users. They should be only see the
Things that are assigned to them and not even see anyone elses.  My
original idea was to have a group_id placed into the Thing's model and
then in the controller have a check that:
  Thing.group_id in user's.groups
or in sql SELECT * from things where group_id in (<groups user is in>)

Is this the best way to do it?  I may also need to use groups for other
things (ie read-only admins or admins who can only see some screens)
so groups would not just be used for limiting the Thing views.

-- 
Craig Small VK2XLZ   http://enc.com.au/          csmall at : enc.com.au
Debian GNU/Linux     http://www.debian.org/      csmall at : debian.org
GPG fingerprint:     5D2F B320 B825 D939 04D2  0519 3938 F96B DF50 FEA5

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to