[Zope-CMF] DCWorkflow bug? - Updating security settings affects also normal images, not just portal images

Sidnei da Silva sidnei@x3ng.com.br
Sat, 3 Aug 2002 11:19:39 -0300


On Sábado 03 Agosto 2002 01:25, Florent Guillaume wrote:
| Heimo Laukkanen  <huima@fountainpark.org> wrote:
|
| I can confirm, reading the code, that it's what happens.
|
| The problem is that in WorkflowTool, _recursiveUpdateRoleMappings calls
| getChainFor for *all* subobjects, and that getChainFor may return a
| chain for objects that have nothing to do with the workflow:
|
| getChainFor either returns the (Default) workflow for the objects that
| don't have a portal_type but only a meta_type, or, in the case of
| meta_type=Image, which matches an existing portal_type, it returns the
| chain for that portal_type.
|
| I propose that in getChainFor we replace:
|         else:
|             pt = getattr( ob, 'meta_type', None )  # Use a common Zope
| idiom. if pt is None:
|                 return ()
| by:
|         else:
|             return ()
|

+1 for this. Unless we have a good case where it should stay like it is today.

-- 
Sidnei da Silva (dreamcatcher) <sidnei@x3ng.com.br>
X3ng Web Technology <http://www.x3ng.com.br>
GNU/Linux user 257852
Debian GNU/Linux 3.0 (Sid) 2.4.18 ppc

If Bill Gates is the Devil then Linus Torvalds must be the Messiah.
	-- Unknown source