+
+
+ security.declareProtected(AddPortalContent, 'manage_renameObjects')
+ def manage_renameObjects(self, ids=[], new_ids=[], REQUEST=None) :
+ """ Rename subordinate objects
+ A member can rename his owned contents if he has the 'Modify Portal Content' permission.
+ Returns skippend object ids.
+ """
+ if len(ids) != len(new_ids):
+ raise BadRequest(_('Please rename each listed object.'))
+
+ if _checkPermission(ViewManagementScreens, self) : # std zope perm
+ return super(PlinnFolder, self).manage_renameObjects(ids, new_ids, REQUEST)
+
+ mtool = getToolByName(self, 'portal_membership')
+ authMember = mtool.getAuthenticatedMember()
+ skiped = []
+ for id, new_id in zip(ids, new_ids) :
+ if id == new_id : continue
+
+ ob = self._getOb(id)
+ if authMember.allowed(ob, object_roles=['Owner'] ) and \
+ _checkPermission(ModifyPortalContent, ob) :
+ self.manage_renameObject(id, new_id)
+ else :
+ skiped.append(id)
+
+ if REQUEST is not None :
+ return self.manage_main(self, REQUEST, update_menu=1)
+
+ return skiped
+