I have the answer to Q#1:
add the following line to your BaseController class in the appropriate
place:
tmpl_context.identity = request.environ.get('repoze.who.identity')
On May 1, 5:20 pm, percious <[EMAIL PROTECTED]> wrote:
> Ok, so i implemented tgrepozewho into my first PRODUCTION TG2 app.
> That's right, I think TG2 is ready for prime-time.
>
> Nice job guys, this was the last piece of the puzzle I was waiting
> for.
>
> Couple of Q's.
>
> 1) Is there a global tg.identity variable set somewhere? I want to
> provide a header to my application which displays the logged in
> username, but I dont want to send an identity object into each of my
> controller templates.
>
> 2) How can I lock-down a resource which is defined in a controller
> method elsewhere. Such as:
>
> class RootController(BaseController):
>
> #i need locking down
> my_precious = TheRingController()
>
> cheers.
> -chris
>
> PS. Again, nice job, but could we use the tg.repoze.who namespace
> instead?
>
> On May 1, 2:21 pm, Sanjiv <[EMAIL PROTECTED]> wrote:
>
> > > It's fixed, thanks
>
> > Works fine now
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---