If this isn't what you mean, I apologize in advance. I am not a morning
person.

This was the answer I received from Jeff:

1. Via the current identity object:

from turbogears import identity
if 'admin' in identity.current.groups:
    pass

2. Via the user object on the current identity:

from turbogears import identity
if 'admin' in [g.groupId for g in identity.current.user.groups]:
    pass

Reply via email to