[Zope3-checkins] SVN: Zope3/trunk/src/zope/security/ When you get
an Unauthorized error, now you can see the object in addition to
Marius Gedminas
marius at pov.lt
Tue Feb 22 19:53:50 EST 2005
Log message for revision 29253:
When you get an Unauthorized error, now you can see the object in addition to
the attribute and permission names in the traceback.
Should a minor change like this be mentioned in doc/CHANGES.txt?
Changed:
U Zope3/trunk/src/zope/security/_zope_security_checker.c
U Zope3/trunk/src/zope/security/checker.py
-=-
Modified: Zope3/trunk/src/zope/security/_zope_security_checker.c
===================================================================
--- Zope3/trunk/src/zope/security/_zope_security_checker.c 2005-02-23 00:04:53 UTC (rev 29252)
+++ Zope3/trunk/src/zope/security/_zope_security_checker.c 2005-02-23 00:53:50 UTC (rev 29253)
@@ -94,8 +94,8 @@
return 0;
/* else: */
/* __traceback_supplement__ = (TracebackSupplement, object) */
-/* raise Unauthorized(name, permission) */
- r = Py_BuildValue("OO", name, permission);
+/* raise Unauthorized(object, name, permission) */
+ r = Py_BuildValue("OOO", object, name, permission);
if (r == NULL)
return -1;
PyErr_SetObject(Unauthorized, r);
Modified: Zope3/trunk/src/zope/security/checker.py
===================================================================
--- Zope3/trunk/src/zope/security/checker.py 2005-02-23 00:04:53 UTC (rev 29252)
+++ Zope3/trunk/src/zope/security/checker.py 2005-02-23 00:53:50 UTC (rev 29253)
@@ -168,7 +168,7 @@
return # allowed
else:
__traceback_supplement__ = (TracebackSupplement, object)
- raise Unauthorized(name, permission)
+ raise Unauthorized(object, name, permission)
__traceback_supplement__ = (TracebackSupplement, object)
raise ForbiddenAttribute, (name, object)
@@ -183,7 +183,7 @@
return
else:
__traceback_supplement__ = (TracebackSupplement, object)
- raise Unauthorized(name, permission)
+ raise Unauthorized(object, name, permission)
elif name in _available_by_default:
return
More information about the Zope3-Checkins
mailing list