[Zope] unknown authentication requuirement

Michel Pelletier michel@digicool.com
Wed, 28 Jul 1999 10:45:05 -0400


> -----Original Message-----
> From: Bill Anderson [mailto:bill.anderson@libc.org]
> Sent: Tuesday, July 27, 1999 10:53 PM
> To: zope@zope.org
> Subject: Re: [Zope] unknown authentication requuirement
> 
> 
> Bill Anderson wrote:
> > 
> > Ok, after adding this code, my site insists upon 
> authenticating anyone
> > who accesses it. Without it, it works fine.
> > 
> > Any ideas?
> > What am I missing??
> > 
> > ----------------------------------------------------------
> > <!--#in "PARENTS[-1].objectValues(['Folder'])" -->
> > 
> > <!--#if menu -->
> >         &nbsp <a href=<!--#var absolute_url-->> <!--#var 
> title--> </a>
> > <!--#/if -->
> > 
> > <!--#/in-->
> > ----------------------------------------------------------
> > 

The security mechanism is kicking in on something, and since it happens
on every request anywhere, I suspect that you don't have a permission in
your top level folder (PARENTS[-1]) set right.  'objectValues' is
protected by 'Access Contents Information'.  Also note that you many not
have access to a Folder that this code is trying to iterate over. Try:

<dtml-in ""PARENTS[-1].objectValues(['Folder'])">
  <dtml-try>
    <dtml-if menu>
      <a href=<dtml-var absolute_url>><dtml-var title></a>
    </dtml-if>
  <dtml-except Unauthorized>
    You couldn't access this folder
  </dtml-try>
</dtml-in>

This will at least tell you if it's a folder getting you or not.

Of course, we thought of this before, so the best way to really do this
would be to use 'skip_unauthorized' with the #in tag:

<dtml-in ""PARENTS[-1].objectValues(['Folder'])" skip_unauthorized>
    <dtml-if menu>
      <a href=<dtml-var absolute_url>><dtml-var title></a>
    </dtml-if>
</dtml-in>

-Michel