[Zope-PTK] Debugging PTK II

Fabio Forno sciasbat@inorbit.com
Wed, 16 Aug 2000 14:22:14 +0200


Fabio Forno wrote:

> > Actually there isn't supposed to be a comment attribute.  The comment
> > is supposed to be added to the "review history".  You may want to look
> > into getting that functionaliy back in there.
> 
> I'm considering it.
>
Was it left out for some particular reason, or it is just one of the
"ToDos"? ;)
If the second option is true I'll post the code I've added to manage it.
 
> Today I had problems with the catalog (I've seen the same problem in the
> bug tracker): when called with no arguments the REQUEST object is None
> and all the portal objects are returned. Calling it with REQUEST as
> parameter it warks partially (apparently the Manger can search on all
> docuements, a member on his owns, a guest on nothing)
> 

I think I've solved the problem, there is nothing wrong with the
catalog. In the PortalContent.allowedRolesAndUsers method we should test
also the review_state for the View permission. At the end of the method,
before the return, I've added this test for the review_state.

if permission=='View' and self.review_state=='published' and \
            'Member' not in allowed:
            allowed.append('Member') # append also 'Guest' if you want
 
People who have already indexed contents should reindex everything to
make the catalog notice the changes (for this purpose I think it should
be nice to add somewhere a method to reindex everything or just some
portal content categories; I'm going to add it in my portal, if you're
interested I'll post the code)  

ByE,
Fabio Forno