From 6b81d53a2a1faa9e7226f4c7bbd71d4a88ed6401 Mon Sep 17 00:00:00 2001 From: Chris Withers Date: Sat, 25 Sep 2004 01:07:46 +0000 Subject: [PATCH] Collector #1457: ZCTextIndex's QueryError and ParseError are now available for import from untrusted code. --- __init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/__init__.py b/__init__.py index ba40425..8b428d1 100644 --- a/__init__.py +++ b/__init__.py @@ -53,3 +53,10 @@ def getElementNames(self, group): def getIndexTypes(self): return ZCTextIndex.index_types.keys() + +## Allow relevent exceptions to be caught in untrusted code +from AccessControl import ModuleSecurityInfo +ModuleSecurityInfo('Products').declarePublic('ZCTextIndex') +ModuleSecurityInfo('Products.ZCTextIndex').declarePublic('ParseTree') +ModuleSecurityInfo('Products.ZCTextIndex.ParseTree').declarePublic('QueryError') +ModuleSecurityInfo('Products.ZCTextIndex.ParseTree').declarePublic('ParseError')