I've been using my medium sized application as a reference on the IRC channel, and it's helped people a lot. So, here's the link to the app itself: http://hgweb.icelus.tzo.com/cardlist/file/3a29f01078a4
In particular, it seems that you would benefit from looking at the following template: http://hgweb.icelus.tzo.com/cardlist/file/3a29f01078a4/cardlist/templates/master.html I have examples in there of permission based accesses (look at lines 22, 23, 25), and group based accesses (look at line 39). That answers (b) from your email. To answer (a), look at the same link, line 35. That gets you your identity object in a template. In controller code, or model code, look at this link: http://hgweb.icelus.tzo.com/cardlist/file/3a29f01078a4/cardlist/controllers/signups.pyline 71. copy_from_vb is a method I need for my app, but not generally applicable elsewhere. However, request.identity will give you what you're looking for. Hope that helps! On Tue, Jul 21, 2009 at 1:42 PM, El Tea <[email protected]> wrote: > > I have a pretty good grip on predicates. What I am not seeing in the > TG documentation is how to find user information for use in the > controllers and templates. What I want to do: > > a) Get the object for the current user. > b) Determine, in a template, if the current user's group is 'manager' > so I can render the page differently. > > > My apologies if this is an easy one; I've been in the docs for an hour > and all I can find info on is authorization to protect areas of the > site. If you have a handy link with examples, I'd be happy to take > that. > > > -- Michael J. Pedersen My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171 Yahoo/pedermj2002, MSN/[email protected] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

