diff --git a/bt5/erp5_web_shacache/ExtensionTemplateItem/ShaCache.py b/bt5/erp5_web_shacache/ExtensionTemplateItem/ShaCache.py index 4e21bfc1c89222cfaf983a048cb2f452c8d66552..4bc92cf6bf5cef2ca8d4dcc50d56c6842b531d34 100644 --- a/bt5/erp5_web_shacache/ExtensionTemplateItem/ShaCache.py +++ b/bt5/erp5_web_shacache/ExtensionTemplateItem/ShaCache.py @@ -115,13 +115,7 @@ def WebSite_viewAsWebPost(self, *args, **kwargs): document = portal.portal_contributions.newContent(data=self.REQUEST.BODY, filename='shacache', discover_metadata=False, reference=sha512sum, content_type='application/octet-stream') - - # We can only change the state of the object after all the activities and - # interaction workflow, to avoid any security problem. - document.activate(after_path_and_method_id=(document.getPath(), \ - ('convertToBaseFormat', 'Document_tryToConvertToBaseFormat', \ - 'immediateReindexObject', 'recursiveImmediateReindexObject')))\ - .publish() + document.publish() self.REQUEST.RESPONSE.setStatus(201) return sha512sum diff --git a/bt5/erp5_web_shacache/bt/revision b/bt5/erp5_web_shacache/bt/revision index fc9afb48e033d9a7d2a778e81ae0e9424950c1cd..2b82dfea308730c4f925388dbb683e6eae360640 100644 --- a/bt5/erp5_web_shacache/bt/revision +++ b/bt5/erp5_web_shacache/bt/revision @@ -1 +1 @@ -59 \ No newline at end of file +60 \ No newline at end of file diff --git a/bt5/erp5_web_shadir/ExtensionTemplateItem/ShaDir.py b/bt5/erp5_web_shadir/ExtensionTemplateItem/ShaDir.py index 2df8db1ff9b60e6173278ec6382bb7e61919b986..212b124ba9ec91f45cbb00bebdc24d6f55f92887 100644 --- a/bt5/erp5_web_shadir/ExtensionTemplateItem/ShaDir.py +++ b/bt5/erp5_web_shadir/ExtensionTemplateItem/ShaDir.py @@ -119,13 +119,6 @@ def WebSection_putFactory(self, name, typ, body): document = portal.portal_contributions.newContent(data=body, filename=name, discover_metadata=False) - - # We can only change the state of the object after all the activities and - # interaction workflow, to avoid any security problem. - document.activate(after_path_and_method_id=(document.getPath(), \ - ('convertToBaseFormat', 'Document_tryToConvertToBaseFormat', \ - 'immediateReindexObject', 'recursiveImmediateReindexObject')))\ - .publish() - + document.publish() return document diff --git a/bt5/erp5_web_shadir/bt/revision b/bt5/erp5_web_shadir/bt/revision index fc9afb48e033d9a7d2a778e81ae0e9424950c1cd..2b82dfea308730c4f925388dbb683e6eae360640 100644 --- a/bt5/erp5_web_shadir/bt/revision +++ b/bt5/erp5_web_shadir/bt/revision @@ -1 +1 @@ -59 \ No newline at end of file +60 \ No newline at end of file