sureshvv
sureshvv

Reputation: 4422

How to list users having Review permission on content object?

Is there a quick way (catalog search) to list all the users/groups that have Review portal content permission on a content object?

Upvotes: 0

Views: 145

Answers (2)

keul
keul

Reputation: 7819

It's not possible without adding a new index. Take a look at the approach on that product: https://pypi.python.org/pypi/collective.portlet.truereview/

Upvotes: 1

Mathias
Mathias

Reputation: 6839

You cannot do this with a catalog query, since the only security relevant index in the catalog is "allowedRolesAndUsers" by default. This index only handles the "View" permission.

You can add your own index, with the exactly same implementation as the "allowedRolesAndUsers" Index, but check for "Review portal content". See allowedRolesAndUsers implementation

If you do so, you have to patch the reindexObjectSecurity method, otherwise your index will not be updated on security relevant changes, like change roles thru the sharing view. Here is an example how to patch it for Archetypes content using collective.monkeypatcher

Upvotes: 0

Related Questions