RE: [Zope] Newbie help - method needs auth anonymous. WHY?

2000-11-09 Thread Casey Duncan

John Wrote:
[snip]
 I am trying to use this method called objectList:

 ul
   dtml-in objectValues
 lidtml-var id/li
   /dtml-in
 /ul

 I've put it in the standard_html_header.
[snip]
 When I try looking at the root page (http://john:8080) I have to provide
authentication before the page will display.

What your method is doing, is stepping through every object at the root of
your Zope server. Not every object there is accessible by anonymous. Even in
a fresh Zope installation, Control_Panel is restricted to managers, so that
is the likely culprit.

To get around this problem, there is an argument for dtml-in called
"skip_unauthorized" which will automatically skip over any objects that the
current user is not authorized to access.

Changing your dtml-in statement to:
dtml-in objectValues skip_unauthorized

Will prevent this error. However, you will get every little object in your
root directory. So, standard_html_header, index_html, standard_html_footer,
etc. will appear. If you want to exclude these, specify just the meta types
you want to objectValues. For instance, to show only folders try this:

dtml-in expr="objectValues(['Folder'])" skip_unauthorized

To show folders and DTML documents, try this:

dtml-in expr="objectValues(['Folder','DTML Document'])" skip_unauthorized
etc., etc.

hth,
Casey D.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Newbie help - method needs auth anonymous. WHY?

2000-11-08 Thread jvoth

Howdy Folks,

I'm a Zope newbie (5 days and counting).

I am trying to use this method called objectList:

 ul
   dtml-in objectValues
 lidtml-var id/li
   /dtml-in
 /ul

I've put it in the standard_html_header.

When I try looking at the root page (http://john:8080) I have to provide
authentication before the page will display.

How can I alter the permissions so that an anonymous user doesn't
have to log in?

Thanks in advance!

John

-- 
/\
| John Voth   Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 |
| [EMAIL PROTECTED] 403-291-2770, 403-259-6795 (fax)|
\/

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )