how to catalog an object, overiding its allowedRolesAndUsers Keyword index
Hi all, I'm adding some items to the Catalog from an external script. The problem is that when I do that, the allowedRolesAndUsers index of the items is set to 'Manager' which prevents users to find them with the search interface of CMF. Do you know how to set that index when I catalog my items. Here is the idea of the cataloguing script: class Catalogabled: pass def catalog(self): catalogTool = getToolByName(self, 'portal_catalog') urlTool = getToolByName(self, 'portal_url') db = open('somefile', 'r') for line in db.readlines(): li = line.split('|') newObject = Catalogabled() newObject.id = someGeneratedId newObject.Title = li[4] newObject.Description = li[16] newObject.Type = 'someType' newObject.meta_type = 'someType' newObject.portal_type = 'someType' newObject.SearchableText = li[4] newObject.Creator = 'toto5' newObject.getIcon = 'document_icon.gif' newObject.review_state = 'published' catalogTool.catalog_object(newObject, '%s/catalogs_view?id=%s' %( urlTool.getPortalPath(), newObject.id)) How can I override the ['Manager'] allowedRolesAndUsers index that is set automatically ? Thanks in advance, -- Jean
Jean Baltus wrote:
How can I override the [?Manager?] allowedRolesAndUsers index that is set automatically ?
I'd look instead at getting the content into a workflow state such that the users you want to find it can access it. By doing it, it'll get catalogued with the right roles automatically. cheers, Chris
participants (2)
-
Chris Withers -
Jean Baltus