[Zope-dev] Re: The new SiteAccess and __no_before_traverse__?
Evan Simpson
evan@digicool.com
Sun, 25 Jun 2000 14:06:19 -0400
----- Original Message -----
From: "Christian Scholz" <cs@comlounge.net>
> I am playing around with SiteAccess and Zope 2.2b1 right now and I wonder
> if it's still possible to disable SiteAccess (actually an AccessRule) by
> using __no_before_traverse__?
> It seems not to and I am a bit trapped right now.. ;-)
This has changed, and I need to make it clearer in the documentation. There
is no longer a global "disable all __before_traverse__ hook" URL. Instead,
there are specific SiteAccess object-disabling environment variables.
You need to start Zope with environment variable SUPPRESS_ACCESSRULE set.
There is a similar SUPPRESS_SITEROOT variable for SiteRoots.
Fire up a command shell and type (*nix):
SUPPRESS_ACCESSRULE=1
export SUPPRESS_ACCESSRULE
or (Windows):
set SUPPRESS_ACCESSRULE=1
...and then whatever command you use to start Zope
> Even deleting SiteAccess from the Products-Directory didn't work as then
> Zope encountered a missing doc string error for the directory when trying
> to access it.
That's because the fundamental mechanism is built into Zope 2.2, rather than
grafted on by SiteAccess 2. It does look like we'd better wrap the hook
call in a try..except pass, though.
Cheers,
Evan @ 4-am & digicool