[Zope-CMF] trivial new portal folder type gives weird workflow/security behavior?
Carl Rendell
cer@sol43.com
Wed, 2 Oct 2002 17:46:39 -0700
On Wednesday, October 2, 2002, at 01:18 PM, Florent Guillaume wrote:
> On Wed, 2002-10-02 at 22:12, Carl Rendell wrote:
>> I understand this part. What i'm not understanding right now is why
>> unpublished items within a published folder are being selected by
>> portal_catalog.searchResults() ?
>
> I don't know. You'll have dig a bit and add debugging statements
> so that
> we find out what's happening. What's the catalog entry for that object?
> When does it change?
>
I've done some additional testing, and now see why i'm getting the
'strange' behavior.
Here is the scenario -
o Create folder under workflow control (Default) and leave private
o Create sub object within the folder hierarchy (tested to various
levels with no change)
o 'Publish' the folder
o Sub object is now visible
So why? For some reason the change to the folder workflow state is
also cascading down to the object and changing what it should be in
the allowedRolesAndUsers index -
['Manager','user:x','user:y'] to
['Anonymous', 'user:x', 'user:y', 'Manager', 'Reviewer']
Makes a lot of sense why the objects are visible!
I've confirmed this by publishing and un-publishing the sub-object,
which has the effect of the sub object no longer having its index
changed by the parent. This also explains why the
reindexObjectSecurity() call has little effect because it is
reindexing the allowedRolesAndUsers idx, which has been changed by
the parent.
I'm not sure what this means now? I can see some gross work arounds
like checking all sub objects to see if the allowedRolesAndUsers
matches up with the object review_state, and then doing a resync.
That feels like the wrong thing to do.
So, am I crazy or what? This thing is really baking my noodle right
now. Why would the workflow change sub items?
~C
Carl E. Rendell
Solution43
Information Distribution Consulting | "Ahhhh the power of
cer@sol43.com | acquisition" - Chef Z