[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.28
Steve Alexander
steve@cat-box.net
Mon, 2 Jun 2003 13:43:34 -0400
Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv10642/src/zope/security
Modified Files:
checker.py
Log Message:
Implemented descriptor for __Security_checker__ of context wrappers.
This descriptor gets a checker for the wrapper and for the proxied object,
and returns a checker combined from both of those.
If either the wrapper or the proxied object has no checker defined, then
the checker for the proxied object or the wrapper is returned,
respectively.
If no checkers are defined, None is returned.
=== Zope3/src/zope/security/checker.py 1.27 => 1.28 ===
--- Zope3/src/zope/security/checker.py:1.27 Mon Jun 2 10:36:03 2003
+++ Zope3/src/zope/security/checker.py Mon Jun 2 13:43:03 2003
@@ -522,12 +522,14 @@
# XXX we really need formal proxy introspection
- if type(object) is Proxy:
- # Is this already a security proxy?
- return None
+ #if type(object) is Proxy:
+ # # Is this already a security proxy?
+ # return None
- checker = _getChecker(getattr(object, '__class__', type(object)),
- _defaultChecker)
+ checker = _getChecker(type(object), _defaultChecker)
+
+ #checker = _getChecker(getattr(object, '__class__', type(object)),
+ # _defaultChecker)
if checker is NoProxy:
return None