[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security - IChecker.py:1.1.2.8
Guido van Rossum
guido@python.org
Thu, 18 Apr 2002 15:02:47 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Security
In directory cvs.zope.org:/tmp/cvs-serv32756
Modified Files:
Tag: SecurityProxy-branch
IChecker.py
Log Message:
Methods check_getitem() and check_setitem() don't get to see the key.
Add a whole slew of other check_ methods. (Number methods are still
incomplete.)
=== Zope3/lib/python/Zope/Security/IChecker.py 1.1.2.7 => 1.1.2.8 ===
"""
- def check_getitem(ob, key):
+ def check_getitem(ob):
"""Check whether item access is allowed.
"""
- def check_setitem(ob, key):
+ def check_setitem(ob):
"""Check whether item assignment is allowed.
"""
def check_call(ob):
"""Check whether the object can be called.
"""
+
+ def check_richcompare(ob):
+ """Check whether the object can be rich-compared.
+ """
+
+ def check_iter(ob):
+ """Check whether ob.__iter__ can be called.
+ """
+
+ def check_compare(ob):
+ """Check whether the object can be 3way-compared.
+ """
+
+ def check_hash(ob):
+ """Check whether the object can be hashed.
+ """
+
+ # XXX (More numeric ops should go here)
+
+ def check_nonzero(ob):
+ """Check whether the object can be truth-tested.
+ """
+
+ def check_len(ob):
+ """Check whether the object's length can be taken.
+ """
+
+ def check_slice(ob):
+ """Check whether the object can be sliced.
+ """
+
+ def check_setslice(ob):
+ """Check whether a slice of the object can be assigned.
+ """
+
+ def check_contains(ob):
+ """Check whether 'x in ob' is allowed
+ """.
def proxy(value, checked):