The new SiteAccess and __no_before_traverse__?
Hi! 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.. ;-) 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. Hope, someone can help.. otherwise I might have to use 2.1 again until this is fixed.. regards, Christian -- COM.lounge http://comlounge.net/ communication & design info@comlounge.net
----- 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
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
On Sun, Jun 25, 2000 at 10:10:22PM +0200, Christian Scholz wrote:
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.
This is because the README still points to SiteAccess version 1 documentation... Add a '2' to the word SiteAccess in the URL.. Ethan, could you also use Structured Text in the README? IIRC this should be possible, you can then actually click on the link instead of having to copy and paste it. Or you could add Help files =) -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | The Open Source Web Application Server ---------------------------------------------
----- Original Message ----- From: "Martijn Pieters" <mj@digicool.com>
This is because the README still points to SiteAccess version 1 documentation... Add a '2' to the word SiteAccess in the URL..
Ethan, could you also use Structured Text in the README? IIRC this should be possible, you can then actually click on the link instead of having to copy and paste it. Or you could add Help files =)
I'm definitely planning on adding Help files. I don't know if you can do structured text in a README. Cheers, Evan @ 4-am & digicool
participants (3)
-
cs@comlounge.net -
Evan Simpson -
Martijn Pieters