From 0e943a17555e641bc0eb8d77fb0434a9aba647c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Thu, 26 Apr 2007 22:40:51 +0000 Subject: [PATCH] Allow more classes and function in restricted environment. I think they are safe (tell me if I'm wrong) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14265 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/product/ERP5/__init__.py b/product/ERP5/__init__.py index 4dd6b9eb89..6cfa4710c7 100644 --- a/product/ERP5/__init__.py +++ b/product/ERP5/__init__.py @@ -83,7 +83,13 @@ def initialize( context ): content_constructors = content_constructors, content_classes = content_classes) + # Allow some usefull classes and fonctions in TTW code ModuleSecurityInfo('ZODB.POSException').declarePublic('ConflictError') + ModuleSecurityInfo('pprint').declarePublic('pformat') + ModuleSecurityInfo('zExceptions').declarePublic('BadRequest', 'NotFound', + 'Redirect', 'Unauthorized') + ModuleSecurityInfo('Products.CMFCore.WorkflowCore').declarePublic( + 'WorkflowException') # backward compatibility names XML = None -- 2.30.9