[Zope3-checkins] 
	SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/interface/vocabulary.py
	Revert part of revision 27378, and add a comment about why
    Fred L. Drake, Jr. 
    fdrake at gmail.com
       
    Wed Sep  1 11:42:19 EDT 2004
    
    
  
Log message for revision 27384:
  Revert part of revision 27378, and add a comment about why
  removeSecurityProxy() is being used.
Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/interface/vocabulary.py
-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/interface/vocabulary.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/interface/vocabulary.py	2004-09-01 14:40:28 UTC (rev 27383)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/interface/vocabulary.py	2004-09-01 15:42:18 UTC (rev 27384)
@@ -50,7 +50,10 @@
     """
 
     def __init__(self, context):
-        interfaces = providedBy(context).flattened()
+        # Remove the security proxy so the values from the vocabulary
+        # are the actual interfaces and not proxies.
+        component = removeSecurityProxy(context)
+        interfaces = providedBy(component).flattened()
         terms = [SimpleTerm(interface, interfaceToName(context, interface))
                  for interface in interfaces]
         super(ObjectInterfacesVocabulary, self).__init__(terms)
    
    
More information about the Zope3-Checkins
mailing list