[Zope-dev] Re: The new SiteAccess and __no_before_traverse__?

Christian Scholz cs@comlounge.net
Sun, 25 Jun 2000 22:10:22 +0200


Hi!

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

Actually I looked up the documentation and there is still mentioned this
hook.

> You need to start Zope with environment variable SUPPRESS_ACCESSRULE set.
> There is a similar SUPPRESS_SITEROOT variable for SiteRoots.

Hm, is there a way of doing this without having to restart Zope. In some
environments this might not be the best solution (e.g. if you want to
move your application to a production server and have to set up a special
SiteRoot and then notices that you mistyped something.. )

> Fire up a command shell and type (*nix):
> 
> SUPPRESS_ACCESSRULE=1
> export SUPPRESS_ACCESSRULE

Ok, thanks, that's working :)

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

It's a little confusing the way it is right now.. 

Thanks for the fast answer :)

-- christian


-- 
COM.lounge                                          http://comlounge.net/
communication & design                                 info@comlounge.net