[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.44.2.2

Sidnei da Silva sidnei at awkly.org
Wed Mar 3 15:17:29 EST 2004


Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv21085/security

Modified Files:
      Tag: runyaga-sip-branch
	checker.py 
Log Message:
A missing return, a value that was being set but not returned, pass object as the 'value' argument to Unauthorized.


=== Zope3/src/zope/security/checker.py 1.44.2.1 => 1.44.2.2 ===
--- Zope3/src/zope/security/checker.py:1.44.2.1	Wed Mar  3 14:57:37 2004
+++ Zope3/src/zope/security/checker.py	Wed Mar  3 15:17:28 2004
@@ -149,7 +149,7 @@
             else:
                 __traceback_supplement__ = (TracebackSupplement, object)
                 needed = {'permission': permission}
-                raise Unauthorized(name, needed=needed)
+                raise Unauthorized(name, value=object, needed=needed)
 
         __traceback_supplement__ = (TracebackSupplement, object)
         raise ForbiddenAttribute, (name, object)
@@ -166,7 +166,7 @@
             else:
                 __traceback_supplement__ = (TracebackSupplement, object)
                 needed = {'permission': permission}
-                raise Unauthorized(name, needed=needed)
+                raise Unauthorized(name, value=object, needed=needed)
         elif name in _always_available:
             return
 
@@ -311,7 +311,7 @@
             else:
                 __traceback_supplement__ = (TracebackSupplement, object)
                 needed = {'permission': permission}
-                raise Unauthorized(name, needed=needed)
+                raise Unauthorized(name, value=object, needed=needed)
         else:
             # let the original checker decide
             self._original_checker.check(object, name)
@@ -329,7 +329,7 @@
             else:
                 __traceback_supplement__ = (TracebackSupplement, object)
                 needed = {'permission': permission}
-                raise Unauthorized(name, needed=needed)
+                raise Unauthorized(name, value=object, needed=needed)
         else:
             # let the original checker decide
             self._original_checker.check_getattr(object, name)
@@ -347,7 +347,7 @@
             else:
                 __traceback_supplement__ = (TracebackSupplement, object)
                 needed = {'permission': permission}
-                raise Unauthorized(name, needed=needed)
+                raise Unauthorized(name=name, value=object, needed=needed)
         else:
             # let the original checker decide
             self._original_checker.check_setattr(object, name)




More information about the Zope3-Checkins mailing list