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