[Zope-CMF] Strange way to make multiple author and reviewer roles in Zope CMF
Fri, 21 Feb 2003 20:14:17 +0000 (UTC)
David Cain <email@example.com> wrote:
> If I want to add someone as an author to a folder called bsd/ I simply
> go to local roles under bsd/ and add them as an "owner" role on that
> To add someone as a local reviewer (local reviewers cannot see all
> content for review on the portal):
> o I go to local roles on that folder and add their account with
> "reviewer" role.
> o I then must go to portal_catalog/ and press Update Catalog.
> To remove a reviewer from that folder:
> o I go to local roles and add remove their account
> o I then must go to portal_catalog/ and press Update Catalog. If they
> had other roles, I must add their account back with those roles.
> Can anyone tell my why this works? And more importantly, is there an
> easier solution to this?
> I don't feel comfortable updating the catalog.
CMF objects should not be manipulated through the ZMI, otherwise (as you
saw) some CMF invariants (here, the cataloging) are not enforced. The
"legit" way to change local roles in CMF is to do it through the
folder_localrole_form.pt (which is designed only for folders but should
work for all content types I think), or directly call the appropriate
portal_membership methods, see folder_localrole_edit.py.
If you want to do it "by hand", then you'll have to call
ob.reindexObjectSecurity() afterwards, which is what portal_membership
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87 http://nuxeo.com mailto:firstname.lastname@example.org