[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/checker.py Added security declarations for Set and ImmutableSet.

Marius Gedminas marius at pov.lt
Fri Jun 25 10:32:00 EDT 2004


Log message for revision 25981:
Added security declarations for Set and ImmutableSet.




-=-
Modified: Zope3/trunk/src/zope/security/checker.py
===================================================================
--- Zope3/trunk/src/zope/security/checker.py	2004-06-25 11:04:30 UTC (rev 25980)
+++ Zope3/trunk/src/zope/security/checker.py	2004-06-25 14:32:00 UTC (rev 25981)
@@ -21,12 +21,13 @@
 messages about granted attribute access.
 
 Note that the ZOPE_WATCH_CHECKERS mechanism will eventually be
-replaces with a more general ecurity auditing mechanism.
+replaces with a more general security auditing mechanism.
 
 $Id$
 """
 import os
 import sys
+import sets
 import types
 import datetime
 import weakref
@@ -546,6 +547,13 @@
 
 _iteratorChecker = NamesChecker(['next', '__iter__'])
 
+_setChecker = NamesChecker(['__iter__', '__len__', '__str__', '__contains__',
+                            'copy', 'difference', 'intersection', 'issubset',
+                            'issuperset', 'symmetric_difference', 'union',
+                            '__and__', '__or__', '__sub__', '__xor__',
+                            '__eq__', '__ne__', '__lt__', '__gt__',
+                            '__le__', '__ge__'])
+
 BasicTypes = {
     object: NoProxy,
     int: NoProxy,
@@ -601,6 +609,8 @@
     list: NamesChecker(['__getitem__', '__getslice__', '__len__', '__iter__',
                         '__contains__', 'index', 'count', '__str__',
                         '__add__', '__radd__', ]),
+    sets.Set: _setChecker,
+    sets.ImmutableSet: _setChecker,
 
     # YAGNI: () a rock
     tuple: NamesChecker(['__getitem__', '__getslice__', '__add__', '__radd__',



More information about the Zope3-Checkins mailing list