[Zope-Checkins] CVS: Zope3/lib/python/Zope/Security - IChecker.py:1.1.2.7
Guido van Rossum
guido@python.org
Thu, 18 Apr 2002 14:27:02 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/Security
In directory cvs.zope.org:/tmp/cvs-serv12150
Modified Files:
Tag: SecurityProxy-branch
IChecker.py
Log Message:
Add check_setitem(). Normalize whitespace. End sentences in periods.
=== Zope3/lib/python/Zope/Security/IChecker.py 1.1.2.6 => 1.1.2.7 ===
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
@@ -32,32 +32,34 @@
checked = checker.check_getitem(ob, key)
return checker.proxy(ob[key], checked)
-
+
Note that two different naming conventions are used to separate
the individual operation checkers from other methods.
"""
def check_getattr(ob, name):
- """Check whether attribute access is allowed
+ """Check whether attribute access is allowed.
"""
def check_setattr(ob, name):
- """Check whether attribute assignment is allowed
+ """Check whether attribute assignment is allowed.
"""
def check_getitem(ob, key):
- """Check whether an item access is allowed
+ """Check whether item access is allowed.
+ """
+
+ def check_setitem(ob, key):
+ """Check whether item assignment is allowed.
"""
def check_call(ob):
"""Check whether the object can be called.
"""
-
+
def proxy(value, checked):
- """Return a security proxy for the value
+ """Return a security proxy for the value.
The second argument passed is the return value from a checker.
"""
-
-