[Zope] Site Access Rules and Permissions

Chris Withers chrisw@nipltd.com
Tue, 14 Mar 2000 11:17:39 +0000


Evan,

Cheers, gave an anonymous proxy role, worked a treat :-)

I did notice while playing around with this that moving or copying DTML methods that have been set
as site access rules did have some bizarre effects I wasn't expecting. I think when I copied one, it
stopped working, or something like that...as well as some other such wierdities, is this to be
expected?

Chris

PS: What do you, or anyone else for that matter, think of the rule as a solution to the problem in
my earlier post? I don't *think* I need any magic folders or anything else, but I'd like to get a
second (third, fourth and possibly fifth ;-) opinion before I put it into production...

<dtml-if "_.has_key('virtual_host') and REQUEST.environ['HTTP_HOST']==virtual_host">
 <dtml-call "REQUEST.setURL(path='/')">
</dtml-if>

Evan Simpson wrote:
> 
> ----- Original Message -----
> From: Chris Withers <chrisw@nipltd.com>
> > I have the following access rule:
> >
> > <dtml-if "_.has_key('virtual_host') and
> REQUEST.environ['HTTP_HOST']==virtual_host">
> >  <dtml-call "REQUEST.setURL(path='/')">
> > </dtml-if>
> 
> > However, if I try and access any folder with this rule in it, I get
> challenged for authentication
> > and get 'Authorization failed' no matter what username and password I use,
> including the root ones!
> 
> Access Rules are triggered before authentication can be performed, so their
> permissions are nil.  If you want them to access anything other than REQUEST
> (as you do) you must give them a Proxy role.
> 
> Cheers,
> 
> Evan @ digicool & 4-am