[Zope-CMF] Re: Security, Catalog - Filtering unauthorised away.
Carl Rendell
cer@sol43.com
Thu, 20 Jun 2002 09:24:05 -0700
Heimo,
I don't have a complete script, but I've written the some scripts
that call workflow
actions for adding content programmatically. It should be trivial
to put these inside of a for loop for objects from a
portal_catalog.searchResults() call.
It's posted on zopelabs -
http://www.zopelabs.com/cookbook/1003270687
See the comments section
The line that applies is as follows, and I'm changing state here,
but any 'doActionFor' could be called.
oi.portal_workflow.doActionFor(oi,idict['workflow_action'],
comment=idict['workflow_comment'])
~C
On Thursday, June 20, 2002, at 08:33 AM, zope-cmf-request@zope.org
wrote:
>
> Heimo Laukkanen wrote:
>
>> My directiry structure is something like following:
>>
>> Foo
>> +
>> +--- bar
>> +--- cold
>> +-------file
> ...
>> Now. The problem is that I wouldn't like the portal search to include
>> these files that the user has no rigths to - but it does. What
>> would be
>> the rigth / good way to filter out from the search result set those
>> brains that point out to a file where I the user does not have
>> access to.
>
>
> STUMPF! Solved it. My mistake. The permissions from workflow just
> bit me
> in the anckle. I had to make permission into more sensible, then
> retract
> the documents and publish them again -- so that the permission pattern
> would be ok.
>
> Has anyone yet written a python-script that would fetch every singe
> Portal-object and do workflow-actions on it. Meaning it would be quite
> usefull for that kind of situations, if you have to set permissions
> again in a workflow...
>
> Or is there a better way to do it?
>
> -huima
>
Carl E. Rendell
Solution43
Information Distribution Consulting | "Ahhhh the power of
cer@sol43.com | acquisition" - Chef Z