RE: [Zope] Newbie help - method needs auth > anonymous. WHY?
John Wrote: [snip]
I am trying to use this method called objectList:
<ul> <dtml-in objectValues> <li><dtml-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.
Howdy Folks, I'm looking for man pages on these dtml functions? I'm finding it terribly difficult and frustration to figure out how to properly program in dtml since I can't do a man on a funtion (ie:man objectValues) and read about what parameters the function is expection from me. I'd like to browse the dtml man pages and see what functions are available to me. I've been reading all kinds of documents for the last week but I get the feeling that Zope is somewhat immature as a product. So, any ideas about those man pages? Thanks in advance. John /====================================================================\ | John Voth Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 | | jvoth@mobiltex.com 403-291-2770, 403-259-6795 (fax) | \====================================================================/
John, Have you tried http://zdp.zope.org , in particular the Zope Quick Reference. Every Zope user/developer should use it as their bible. hth Phil phil.harris@zope.co.uk ----- Original Message ----- From: <jvoth@mobiltex.com> To: <zope@zope.org> Sent: Saturday, November 11, 2000 12:11 AM Subject: [Zope] Are there any man pages out there for these functions? | | Howdy Folks, | | I'm looking for man pages on these dtml functions? | | I'm finding it terribly difficult and frustration to figure out how to | properly program in dtml since I can't do a man on a funtion | (ie:man objectValues) and read about what parameters the function is | expection from me. | | I'd like to browse the dtml man pages and see what functions are | available to me. I've been reading all kinds of documents for the last | week but I get the feeling that Zope is somewhat immature as a product. | | So, any ideas about those man pages? | | Thanks in advance. | John | | /====================================================================\ | | John Voth Mobiltex Data Ltd.Calgary, Alberta,Canada, T1Y-4T7 | | | jvoth@mobiltex.com 403-291-2770, 403-259-6795 (fax) | | \====================================================================/ | | _______________________________________________ | Zope maillist - Zope@zope.org | 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 )
jvoth@mobiltex.com wrote:
Howdy Folks,
I'm looking for man pages on these dtml functions?
I'm finding it terribly difficult and frustration to figure out how to properly program in dtml since I can't do a man on a funtion (ie:man objectValues) and read about what parameters the function is expection from me.
I'd like to browse the dtml man pages and see what functions are available to me. I've been reading all kinds of documents for the last week but I get the feeling that Zope is somewhat immature as a product.
So, any ideas about those man pages?
Yes, in Zope, click the 'Help' button. On the left is a navigation tree, open 'Zope Help' and then open 'API Documentation'. For documentation on 'objectValues' for example, look at the 'ObjectManager' API screen. It's not very discoverable; we need to work on making a better help interface. -Michel
participants (4)
-
Casey Duncan -
jvoth@mobiltex.com -
Michel Pelletier -
Phil Harris