[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/interfaces.py
Documentation specification: clarify that the check* methods
on the checker should only raise Forbidden or Unauthorized.
Gary Poster
gary at zope.com
Mon Jan 24 22:19:31 EST 2005
Log message for revision 28951:
Documentation specification: clarify that the check* methods on the checker should only raise Forbidden or Unauthorized.
Changed:
U Zope3/trunk/src/zope/security/interfaces.py
-=-
Modified: Zope3/trunk/src/zope/security/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/security/interfaces.py 2005-01-24 23:05:05 UTC (rev 28950)
+++ Zope3/trunk/src/zope/security/interfaces.py 2005-01-25 03:19:31 UTC (rev 28951)
@@ -110,16 +110,20 @@
def check_getattr(ob, name):
"""Check whether attribute access is allowed.
+ May raise Unauthorized or Forbidden. Returns no value.
+
If a checker implements __setitem__, then __setitem__ will be
- called rather than check_getattr to chack whether an attribute
+ called rather than check_getattr to check whether an attribute
access is allowed. This is a hack that allows significantly
greater performance due to the fact that low-level operator
access is much faster than method access.
-
"""
def check_setattr(ob, name):
- """Check whether attribute assignment is allowed."""
+ """Check whether attribute assignment is allowed.
+
+ May raise Unauthorized or Forbidden. Returns no value.
+ """
def check(ob, operation):
"""Check whether operation is allowed.
@@ -127,12 +131,13 @@
The operation name is the Python special method name,
e.g. "__getitem__".
+ May raise Unauthorized or Forbidden. Returns no value.
+
If a checker implements __setitem__, then __setitem__ will be
called rather than check to chack whether an operation is
allowed. This is a hack that allows significantly greater
performance due to the fact that low-level operator access is
much faster than method access.
-
"""
def proxy(value):
@@ -143,7 +148,6 @@
that allows significantly greater performance due to the fact
that low-level operator access is much faster than method
access.
-
"""
More information about the Zope3-Checkins
mailing list