[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/schemacontent/content.py Fix bug in ContentComponentDefinition/Registration. We don't have the permission to change the name to None in deactivate and to self.name in activate. Force this whit trustedRemoveSecurityProxy.

Roger Ineichen roger at projekt01.ch
Fri May 28 16:36:46 EDT 2004


Log message for revision 25102:
Fix bug in ContentComponentDefinition/Registration. We don't have the permission to change the name to None in deactivate and to self.name in activate. Force this whit trustedRemoveSecurityProxy.


-=-
Modified: Zope3/trunk/src/zope/app/schemacontent/content.py
===================================================================
--- Zope3/trunk/src/zope/app/schemacontent/content.py	2004-05-28 20:30:17 UTC (rev 25101)
+++ Zope3/trunk/src/zope/app/schemacontent/content.py	2004-05-28 20:36:45 UTC (rev 25102)
@@ -33,6 +33,7 @@
 from zope.interface import directlyProvides, implements
 from zope.schema import getFields
 from zope.security.checker import CheckerPublic, Checker, defineChecker
+from zope.security.proxy import trustedRemoveSecurityProxy
 
 from interfaces import IContentComponentDefinition, IContentComponentMenuItem
 from interfaces import IContentComponentInstance
@@ -264,6 +265,7 @@
         appropriate menu.
         """
         component = self.getComponent()
+        component = trustedRemoveSecurityProxy(component)
         component.name = self.name
         IContentComponentMenuItem(component).createMenuItem()
 
@@ -271,6 +273,7 @@
         """Once activated, we have to unregister the new Content Object with
         the appropriate menu."""
         component = self.getComponent()
+        component = trustedRemoveSecurityProxy(component)
         component.name = None
         IContentComponentMenuItem(component).removeMenuItem()
 




More information about the Zope3-Checkins mailing list