Hi, Diez.
On Tuesday November 25, 2008 16:50:08 Diez B. Roggisch wrote:
> I understand that sentiment, and if repoze.wha and what are supposed to be
> independent middlewares - so mote it be.
>
> From and end-user POV however this is a moot point. I don't have the
> environ available in TG2. Django makes these things explicit - TG doesn't.
>
> So not putting them into repoze.what will introduce the need to wrap them
> again, passing the explicit environment which is fetched from some
> thread-local storage (or even the SOP, to keep mulit-apps possible I
> presume, yet I don't know when such a stack is pushed/pop'd).
I don't think it's a big problem for two reasons:
1.- Implementing such functionality is trivial both in the application and
in the framework:
> def get_username():
> from tg import request
> identity = request.environ.get('repoze.who.identity')
> return identity and identity.get('repoze.who.userid')
2.- I think most applications won't use get_groups() or get_permissions()
helpers. Why would you need them if repoze.what already deals with them to
grant/deny access?
*However*, I think it's absolutely necessary a function that returns the
identity dict itself.
Cheers.
--
Gustavo Narea <http://gustavonarea.net/>.
Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---