Make sure an ERP5 instance is deletable on CMF 2.2 (approved by jm)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29883 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 64ff814e
...@@ -209,6 +209,17 @@ class ERP5Site(FolderMixIn, CMFSite): ...@@ -209,6 +209,17 @@ class ERP5Site(FolderMixIn, CMFSite):
""" """
return self.index_html() return self.index_html()
def manage_beforeDelete(self, item, container):
# On Zope 2.8, skin is setup during Acquisition (in the .__of__() method).
# On Zope 2.12, skin is setup during __before_publishing_traverse__, which
# doesn't happen when the object is being deleted from the management
# interface, but we need it to be set for portal_activities when we're
# being deleted.
self.setupCurrentSkin(self.REQUEST)
return ERP5Site.inheritedAttribute('manage_beforeDelete')(self,
item,
container)
security.declareProtected( Permissions.ModifyPortalContent, 'manage_renameObject' ) security.declareProtected( Permissions.ModifyPortalContent, 'manage_renameObject' )
def manage_renameObject(self, id=None, new_id=None, REQUEST=None): def manage_renameObject(self, id=None, new_id=None, REQUEST=None):
"""manage renaming an object while keeping coherency for contained """manage renaming an object while keeping coherency for contained
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment