[Zope-CMF] Unable to 'Undo'

Carl Rendell cer@sol43.com
Sat, 13 Jul 2002 09:35:21 -0700


On Friday, July 12, 2002, at 10:58  AM, zope-cmf-request@zope.org wrote:

> Message: 2
> Date: Fri, 12 Jul 2002 09:19:15 -0700
> From: Carl Rendell <cer@sol43.com>
> To: zope-cmf@zope.org
> Subject: [Zope-CMF] Unable to 'Undo'
>
> Folks,
>
> I'm still struggling this morning with using undo from the user
> interface...
>
> Config
> Zope 2.5.1/CMF-1.3-beta2
>
> Use Case
>
> 1. add an item
>
> 2. make changes to item
>
> 3. attempt to undo changes
>
> Behavior
>
> An 'Unauthorized' is returned with the following traceback:
>
> Site Error
>
> An error was encountered while publishing this resource.
>
> Unauthorized
>
>
<snip>
> line 122, in _exec
>      (Object: undo)
>      (Info: ({'script': <FSPythonScript instance at 15d97d0>,
> 'context': <CMFSite instance at 128be00>, 'container': <CMFSite
> instance at 128be00>, 'traverse_subpath': []},
> (['QTBZUzhFa1dPL2NBQUFBQUFEaXBrQUFBQUFBQUFDdUc=\r\n 2002/07/12
> 09:16:17.130 GMT-7 /dev/link_edit '],), {}, None))
>    File Script (Python), line 1, in undo
>    File
> /Applications/ZTest-2.5.1/lib/python/Products/CMFCore/UndoTool.py,
> line 116, in undo
>      (Object: portal_undo)
> Unauthorized: (see above)
>
>
</snip>

More research and testing reveals that there are three lines in the 
CMFCore.UndoTool that are giving me [ is it just me? ] the 
behavior - lines 114 - 116

         for tinfo in transaction_info:
             if not xids.get( tinfo, None ):
                 raise Unauthorized

If these ar commented out, the ability to _undo_ from the user 
interface returns. Most of the code in this version of the UndoTool 
has been added since CMF 1.2, and is - as the comment indicates - a 
belt and suspenders approach to assuring user's ability to undo 
transactions [ was this a problem before? ]

So, is this a bug, do I have a strange configuration, something 
else? I have a work around that works for me, but there seems to be 
something deeper here.

BTW, I've tested all manner of installation with all versions of 
CMF, and the behavior is consistent... Unauthorized is raised when 
attempting to perform Undo from the user interface in CMF 1.3-betaX.

~C

Carl E. Rendell
Solution43
Information Distribution Consulting        |   "Ahhhh the power of
cer@sol43.com                              |    acquisition"  - Chef Z