[Zope-CMF] RE: [Zope-CMF][Help!] how to include links for members with published index_html

Jason Wehmhoener webmaster@saturn.deanza.fhda.edu
Mon, 30 Apr 2001 10:58:07 -0700


I noticed when I customized standard_html_header to include the code that
folder_contents uses to display the folder contents, that anonymous users
could then view all documents whether they were published or not.

I believe I'm going to need to use portal_workflow.getInfoFor somehow to
check to see if each document is published before I display a link to it,
but I'm having a hard time puzzling this out:

> getInfoFor(ob, name, default, wf_id=None, *args, **kw):
>
> Invoked by user interface code. Allows the user to request information
provided
> by the workflow. The workflow object must perform its own security checks.

What do the attributes mean?  How are they to be used?

I would have thought that the following code would display the title and the
status
of each item in a folder, but for some reason the status never gets printed.

<dtml-in expr="contentValues(filter=decodeFolderFilter(
         REQUEST.get('folderfilter', '')))"
         sort="id" size="19" start=qs skip_unauthorized>
  <dtml-let obj="_.getitem('sequence-item', 0 )"
            objState="portal_workflow.getInfoFor(obj, 'objState', '')">
    <dtml-var title><br>
    Status: <dtml-var objState><br>
  </dtml-let>
</dtml-in>

Any idea what I'm doing wrong?

Also, there's the deeper issue that I am never getting any kind of
permission error when trying to view documents as an anonymous user.  Why is
that?!

Thanks,
Jason

> -----Original Message-----
> From: zope-cmf-admin@zope.org [mailto:zope-cmf-admin@zope.org]On Behalf
> Of marc lindahl
> Sent: Monday, April 30, 2001 10:13 AM
> To: zope-cmf@zope.org
> Subject: Re: [Zope-CMF] how to include links for members with published
> index_html
>
>
> The thing with that method is, you get live links that will give you
> permission errors when clicked - I tried that.  If the user's
> index_html is
> still private, you get a permission error.  I wanted the links to be only
> live if they are followable.
>
> > From: "Rolander, Dan" <Dan.Rolander@marriott.com>
> > Date: Mon, 30 Apr 2001 10:29:03 -0400
> > To: 'marc lindahl' <marc@bowery.com>, zope-cmf@zope.org
> > Subject: RE: [Zope-CMF] how to include links for members with
> published in
> > dex_html
> >
> > I just customized roster and only changed the verifyPermission
> value from 1
> > to 0. A user still has to be logged in to see the roster, but
> once logged in
> > all of the listed links are live.
> >
> > <dtml-in roster mapping size=bs orphan=1 start=qs>
> > <dtml-let homeUrl="portal_membership.getHomeUrl(id,
> verifyPermission=0)">
> >
> > -----Original Message-----
> > From: marc lindahl [mailto:marc@bowery.com]
> > Sent: Friday, April 27, 2001 6:39 PM
> > To: zope-cmf@zope.org
> > Subject: Re: [Zope-CMF] how to include links for members with published
> > index_html
> >
> >
> > ...ugly, but this works:
> >
> > roster.dtml
> >
> > <snip>
> > <dtml-let homeUrl="portal_membership.getHomeUrl(id,
> verifyPermission=0)">
> > <dtml-let homeFolder="portal_membership.getHomeFolder(id,
> > verifyPermission=0)">
> > <tr>
> > <td> <br> </td>
> > <td> <dtml-try>
> > <dtml-if "_.SecurityValidateValue(homeFolder.index_html) or
> > _.SecurityValidateValue(homeFolder)">
> > <a href="&dtml-homeUrl;">&dtml-id;</a>
> > <dtml-else>
> > &dtml-id;
> > </dtml-if>
> > <dtml-except Unauthorized>
> > &dtml-id;
> > </dtml-try>
> > </td>
> > <snip>
> >
> >
> >
> > ....comments?
> >
> >
> > _______________________________________________
> > Zope-CMF maillist  -  Zope-CMF@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-cmf
> >
> > See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> > requests
> >
> > _______________________________________________
> > Zope-CMF maillist  -  Zope-CMF@zope.org
> > http://lists.zope.org/mailman/listinfo/zope-cmf
> >
> > See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
> > requests
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and
> feature requests