Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
Revert part of revision 27378, and add a comment about why
Browse files Browse the repository at this point in the history
removeSecurityProxy() is being used.
  • Loading branch information
freddrake committed Sep 1, 2004
1 parent bf550f2 commit 5eab206
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vocabulary.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ class ObjectInterfacesVocabulary(SimpleVocabulary):
"""

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)

0 comments on commit 5eab206

Please sign in to comment.