[Zope-dev] ZCatalog search permission problem

Bjorn Stabell bjorn@exoweb.net
Sun, 11 Nov 2001 18:18:17 +0800


Hi all,

I'm using Zope 2.4 with DC Workflow 0.4 and recently I made some
permissions and role changes that I think messed up the ZCatalog search.
Right now, as Anonymous, searchResults() returns no matches.  Looking at
the portal_catalog (I'm using CMF) almost all content has
allowedUsers]AndRoles that looks like this:

	 ['Writer', 'user:bjorn', 'Reviewer', 'Anonymous', 'Editor',
'Authenticated', 'Manager', 'Member'] =20

I even made a program, dumpPerm() that dumps the permission settings on
an object for the current user (see below): it shows that Anonymous has
View permission on all content.  Effective date is in the past, expire
date in the future.  Still, nothing shows up in searchResults().  I've
recataloged and recataloged, but to no avail.

Help, please....???????

Regards,
--=20
Bjorn


----

# used as External method

def dumpPerm(self):
    """ Dump all permissions this user has on this object """

    user =3D self.REQUEST.AUTHENTICATED_USER
    resp =3D self.REQUEST.RESPONSE

    resp.setHeader('Content-type', 'text/plain')
    resp.write("Permission settings for "+str(user)+" on
"+str(self.id)+"\r\n\n")

    for perm in self.permission_settings():
         if user.has_permission(perm['name'], self):
             resp.write(" "+str(perm['name'])+"\r\n")
         else:
             resp.write("("+str(perm['name'])+")\r\n")