[Zope] Authorization failure

Sture Lygren sture@rocketrange.no
Sun, 03 Oct 1999 21:59:25 +0200


Hello again!

Your answer helped get the method working - thanks!

But now I'm stuck with a new problem (as always). I try to use the
method quoted below to show private and public folders for a user.
Trouble is all I get is the '+' and '-' signs on expandable and
collapsabe folders, no icon and no text. Only the manager get the
correct icons and text shown. Why is this so?

DTML-method show_tree accessed from index_html (also a DTML-method):

<dtml-tree branches_expr="objectValues(['Folder','File'])" sort=id
skip_unauthorized=1>
<dtml-if "AUTHENTICATED_USER.has_role('Owner',_.getitem('id',1)) or
AUTHENTICATED_USER.has_permission('View',_.getitem('id',1))">
 <dtml-if "meta_type=='Folder'">
  <img src="<dtml-var SCRIPT_NAME>/<dtml-var icon>" border="0">
<dtml-var id>
 <dtml-else>
  <a href="<dtml-var tree-item-url>"><img src="<dtml-var
SCRIPT_NAME>/<dtml-var icon>" border="0"> <dtml-var id></a>
 </dtml-if>
</dtml-if>
</dtml-tree>

Hope you can help me out here.

Thanks in advance.

Sture Lygren

Michel Pelletier wrote:

> Sture Lygren wrote:
> >
> > Hi!
> >
> > I'm stuck with a problem here and hope someone can help me out ...
> >
> > I try to make a folder & file tree view using the code:
> >
> > DTML-method - show_tree
> >
> > <dtml-tree branches_expr="objectValues(['Folder, 'File'])"
>
> Use <dtml-tree branches_expr="objectValues(['Folder', 'File'])"
> skip_unauthorized=1>
>
> -Michel
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (Related lists - please, no cross posts or HTML encoding!
>
> To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )