plone 2.5, iterate, and ModifyPortalContent permission

Robert Zaar rjzaar at optusnet.com.au
Sun Oct 28 00:01:51 UTC 2007


I can't use 3.0 due to the required products have not been ported to 3.0 
from 2.5. I'm trying to set up a Working Copy functionality in plone 
2.5. Sorry I can't understand the suggested howto.

I'm happy to give the owner of a document the ability to checkout a 
Document. Then submit it and one of the managers to check it in.

To perform the checkout, the owner needs to have the 
"ModifyPortalContent" permission. But for some reason .reindexObject 
sets the ModifyPortalContent permission to only the Manager and 
acquire=False!

.reindexObject is called on checkout and checkin.

I've tried adding the following code to the checkout and checkin scripts 
to no avail.

from Products.CMFCore import permissions
context.manage_permission(
          permissions.ModifyPortalContent,
          roles = ["Owner", "Manager"],
          acquire=True)

This is placed after .reindexObject.

Is there a way to set the permissions on the Object? What is it? Am I 
missing something? Any help directions welcome.

Cheers,

Rob




More information about the Product-Developers mailing list