r13742 - in Products.MimetypesRegistry/trunk: . Products/MimetypesRegistry

"Thomas Desvenain" <[email protected]> Wed, 27 Jul 2011 11:39:15 +0000
Newsgroups gmane.comp.web.zope.plone.archetypes.cvs
Message-ID <[email protected]>
Author: thomasdesvenain
Date: Wed Jul 27 11:39:15 2011
New Revision: 13742

Modified:
   Products.MimetypesRegistry/trunk/CHANGES.txt
   Products.MimetypesRegistry/trunk/Products/MimetypesRegistry/__init__.py
Log:
Allow exception MimetypeRegistry in python scripts.
Refs #12061.

Modified: Products.MimetypesRegistry/trunk/CHANGES.txt
==============================================================================
--- Products.MimetypesRegistry/trunk/CHANGES.txt	(original)
+++ Products.MimetypesRegistry/trunk/CHANGES.txt	Wed Jul 27 11:39:15 2011
@@ -4,6 +4,9 @@
 2.0.3 - unreleased
 ------------------
 
+* Allow exception MimetypeRegistry in python scripts.
+  Refs http://dev.plone.org/plone/ticket/12061.
+  [thomasdesvenain]
 
 2.0.2 - 2011-05-12
 ------------------

Modified: Products.MimetypesRegistry/trunk/Products/MimetypesRegistry/__init__.py
==============================================================================
--- Products.MimetypesRegistry/trunk/Products/MimetypesRegistry/__init__.py	(original)
+++ Products.MimetypesRegistry/trunk/Products/MimetypesRegistry/__init__.py	Wed Jul 27 11:39:15 2011
@@ -1,4 +1,5 @@
 from Products.MimetypesRegistry import MimeTypesRegistry
+from AccessControl.SecurityInfo import allow_module, allow_class
 
 GLOBALS = globals()
 PKG_NAME = 'MimetypesRegistry'
@@ -8,10 +9,14 @@
     )
 
 from Products.MimetypesRegistry import mime_types
+from Products.MimetypesRegistry.common import MimeTypeException
+
+allow_module('Products.MimetypesRegistry.common')
+allow_class(MimeTypeException)
 
 def initialize(context):
     from Products.CMFCore import utils
-    utils.ToolInit("%s Tool" % PKG_NAME, 
+    utils.ToolInit("%s Tool" % PKG_NAME,
                    tools=tools,
                    icon="tool.gif",
                    ).initialize(context)

------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey