[Zope3-dev] Workflow Usecase

Janko Hauser jh@comunit.de
Tue, 7 May 2002 15:53:59 +0200


On Tue, 7 May 2002 09:26:08 -0400
Casey Duncan <casey@zope.com> wrote:

> 
> Well, as I think Tres already said, deletion is an operation done by
> a container (just like creation). What you can do, though is
> abstract this functionality in some way so that some application
> defined flag affects the behavior on a per object basis, and/or hook
> manage_beforeDelete on the object(s) to raise an exception when the
> object should not be deleted.
> 
> I suppose a neater solution would be to have the container consult
> the object before removing it. This could involve calling a hook
> like "isRemovable" which would return true if the object deemed that
> it could be removed. This could be part of one of the base OFS
> interfaces for any object that can be contained in a folder.
> Alternately, the container could just check permission settings on
> the object before removing it. This would be simpler if less
> flexible.
> 
The current CopySupport implements this stuff as cb_isCopyable. The
general question I have with these things is policy. So the
information, if an object is deleteAble should be stored in the object
and not the container, but this is not a question of having the right
permission. So the container is allowed to delete the object, but is
polite enough to ask before hand. So it's no guarantee.

So I would like to have this covered by permissions and not by an
interface convention (be polite and ask the object, please :-).

A similar question or usecase is the recursive delete of a folder
tree. Can a tree be deleted, if one has not permissions to delete a
subobject?

__Janko


-- 
i.A. Dr. Janko Hauser
Software Engineering
c o m . u n i t   G m b H
online-schmiede seit 1994

http://www.comunit.de/	mailto:jh@comunit.de
Eiffestr. 598		20537 Hamburg | Germany
Fon 040 | 21 11 05 25	Fax  040 | 21 11 05 26