Hello, everybody.

Since I released repoze.what 1.0 Final two weeks ago, I've been asked several 
times how to integrate repoze.what into Pylons. My answer has been "copy the 
@require decorator from TG2 and if you want controller-wide authorization, 
insert X code into Controller.__before__".

For this reason, and because repoze.what *might* start been used more often in 
Pylons [1], I think I'll write a repoze.what plugin to bring *part* of the 
r.what integration into TG2 to Pylons applications. This plugin will provide 
the following:

 * The @require decorator, moved from TG2. Existing applications *won't* have 
to update their code because TG2 would import it into the "tg" namespace.
 * The upcoming accessible() function [2].
 * Should it be accepted, the Access class proposed by Christoph [3].
 * An optional class decorator to set up controller-wide authorization, as an 
alternative to TG2 controllers' "allow_only" attribute.

Let me highlight beforehand that there's no backwards incompatible change 
here. 

However, it's worth noting that this would allow us remove repoze.what from 
the dependencies of the TG2 package, so that people who don't use repoze.what 
won't have to install it when they deploy their applications -- as long as the 
@require decorator won't be imported into "tg", which will break backwards 
compatibility (people would have to replace "from tg import require" with 
"from repoze.what.plugins.pylons import require"). I'm fine with either of the 
two options (keep repoze.what as a dependency even if people don't use it or 
not), so I'm +0 on this change -- I just wanted to mention this possibility.

Cheers!

PS: This *won't* retard B6, as first I'll just move @require to this plugin 
and then make TG2 import it -- an import which may get removed if you'd prefer 
so.

[1] http://pylonshq.com/project/pylonshq/ticket/561
[2] http://trac.turbogears.org/ticket/2172
[3] http://groups.google.com/group/turbogears-trunk/msg/9062bcc22543cd90
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to