[Zope3-dev] Re: Problem with zope.app.security._protections for tests

Gary Poster gary at zope.com
Mon Aug 8 10:31:35 EDT 2005


On Aug 8, 2005, at 10:21 AM, Fred Drake wrote:

> On 8/8/05, Gary Poster <gary at zope.com> wrote:
>
>> lol.  eek.  yuck. :-)
>>
>
> Yep.  Not sure what the best way to avoid this would be, either.

I'm assuming you mean in Zope 3, rather than avoiding this  
possibility in Python, which seems like futile road.

The relatively-quick-and-obvious-to-me-but-not-necessarily-correct  
solution would be to

- make the zope.security.checker._available_by_default data structure  
rebuild itself the same way that the _checkers data structure resets  
in _clear;

- add an API to add a name in zope.security.checker, parallel to  
defineChecker

- make yet-another-zcml-directive to set the name, and use it in  
zope.app.security.

- delete _protections.py and all references to it.

Gary


More information about the Zope3-dev mailing list