[Zope3-dev] Re: enhancements to undo
Jim Fulton
jim@zope.com
Thu, 19 Jun 2003 16:44:14 -0400
Garrett Smith wrote:
> I noticed that in one of Jim's 'to-do' notes (I can't remember where I
> saw this) there is a plan to enhance the undo mechanism in Zope 3.
Yes, this is in the todo list.
> There are a few features that I think could be useful:
>
> - Undoing an operation in a particular context should display only those
> operations that apply to the context. I think this was mentioned in
> Jim's note.
By context, I assume you mean location. This is the case in Zope 2
and should be the default in Zope 3.
> - It would be nice to give the developer control over the description
> used in the 'undo' operation. Currently the URL that performed the
> operation is listed, which is cryptic to say the least.
The developer has that control already. You can add text to the transaction
description by calling the note method on the current transaction.
> - Ideally, only operations that the current user has permission to undo
> would be listed. Btw, how are these permissions defined in the first
> place? Is there a generic 'undo' permission?
There is (or should be) an undo permission. It would be nice
to only allow undo if the user has permission to do the operations
equivalent to undoing the transaction. That is just way too hard, however.
The transaction doesn't capture enough information to figure that out.
I suggest, instead, that a user can normally only undo their own
work. There will also be a super undo that highly privaledged users could
use to undo other peoples work.
> - It seems to me that undo is just a step away from object versioning.
> It might be nice to be able to annotate certain options as 'version
> increments' that indicate an object is moving from v1, for example, to
> v2. With this information, Zope 3 apps could display a version history
> for an object, similar to other content management systems.
I got suckered into this myself for a long time, which is why
we took so long to create real versioning for Zope.
Don't go there.
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (703) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org