Gustavo Narea schrieb:
> One thing is that right now it can't be used easily in the template, and 
> another is that it can't be used easily inside the controller. The later is 
> not true, although it can and will be easier with the upcoming evaluate() 
> function -- but of course, the meaning of "easily" subjective. :)

With "easily" I mean it must be really simple (at least as simple as in
TG1), following the Zen of TurboGears: "Keep simple things simple" :)

> It doesn't mention that because that is not the recommended way to do so: 
> repoze.what v2 will be 100% repoze.who-independent, and as a consequence, 
> groups and permissions won't be loaded in the repoze.who identity dictionary 
> anymore -- for forward compatibility, they are already available in the 
> repoze.what credentials dictionary (environ['repoze.what.credentials']) as 
> well:
> http://static.repoze.org/whatdocs/Manual/InnerWorkings.html#wsgi-environment-
> variables
> 
> This is, doing that the old way will make it harder for you if you want to 
> upgrade to repoze.what v2. The old way is still there for backwards 
> compatibility with tg.ext.repoze.who, repoze.what's predecessor.

Using repoze.what.credentials instead of repoze.who.identity sounds like
a good idea to me, and I will use it in the future. This was however not
mentioned in the TG 2 docs either (don't expect newbies to read the last
passage of the last page "inner workings" of the external docs ;-)

Suggestion: Why don't we make repoze.what.credentials accessible as both
attribute of the request and as a standard template variable in the same
way as repoze.who.identity? tg.credentials.permissions is a lot simpler
than tg.request.environ['repoze.what.credentials'].permissions.

-- Christoph

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

Reply via email to