[Zope-CMF] TypesTool, Content Actions.. move to ActionInformation?

alan runyan alan runyan" <runyaga@runyaga.com
Tue, 14 May 2002 10:35:12 -0500


Use Case:
* ContentAuthors get a task to update the frontpage Document to reflect
event at company.
* ContentAuthor1 locks frontpage Document to update some information
* ContentAuthor2 a few minutes later gets the task.. goes to change the
frontpage document
* CA1 meanwhle has gone to the bathroom for an extended period of time (too
much Guinness the night before)
* CA2 does his changes.  clicks save.  they get an error saying the Document
is locked. -- is frustrated:
Why did the system *even* allow me to edit the damn Document if it were
already locked?
* CA1 gets back. finishes his changes, saves, and unlocks document.

if there isnt a condition expression it wouldnt execute.  this is how quite
a few ActionInformation work currently.
I would envision there would not be a performance *hog* associated with this
change.
in fact, I only want the 'edit' action to be impacted for most objects.

how else can we prevent people from editing content that is locked?  I do
not believe this is the responsibility of the skin
if we have the actions infrastructure.  Also I would argue for consistency.
I *believe* most actions in CMF are ActionInformation but
in the TypesTool actions they are dictionaries.


NOTE: I believe the latest Plone has had sigificant speed improvements.

~runyaga

----- Original Message -----
From: "Chris Withers" <chrisw@nipltd.com>
To: "alan runyan" <runyaga@runyaga.com>
Cc: <zope-cmf@zope.org>
Sent: Tuesday, May 14, 2002 3:52 AM
Subject: Re: [Zope-CMF] TypesTool, Content Actions.. move to
ActionInformation?


> alan runyan wrote:
> >
> > instances.  And one of the most powerful methods of a ActionInformation
> > instance is hte condition attribute Expression.  .. This way you can
> > conditionally show a action in the ActionsTool.
>
> ...I worry about executing every single condition for every single page
request. I know
> you don't worry much about efficiency in Plone, but that's not true for
all CMF sites, and
> that change would affect all CMF sites ;-)
>
> > would people agree that we should move this to ActionInformation
instances?
>
> not until there's a real use case.
>
> > I would be more than happy to dedicate time doing this.  But i dont know
> > anything about the internals of the ActionsTool at large.  is this
'fairly
> > simple' to do?  or is it huge undertaking?
>
> I very much of the "let sleeping dogs lie" opinion.
>
> > i.e.
> > * object is locked through webdav
> > * in portal_types/Document/actions/edit should have a condition: check
to
> > make sure this object is not locked
> > * we want to conditionally show the edit action.
>
> ...agreed this is a nice to have, but the speed impact worries me...
>
> cheers,
>
> Chris
>
>
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests
>