[Zope] MailBoxer bg script as anonymous user trying to move an
object
Kari-Hans Kommonen
khk at uiah.fi
Fri Jun 25 11:55:32 EDT 2004
We use MailBoxer for collecting mails, and want a script to move an
object received by mailBoxer to a user's own folder.
However, it seems that since the MailBoxer runs as anonymous, the
copy and paste are unauthorized.
We have Manager proxies set for the relevant scripts, and tried
placing various parts of the process in an External method. The
scripts work ok when executed by an authorized user.
I found an earlier related question and Dieter's answer (below). Is
this the only way?
At 23:58 +0200 14.4.2002, Dieter Maurer wrote:
>Noel Duffy writes:
> > > * create a request object with authentication information,
> > > perform a "traverse" on this object (this will set the
> > > user) and then call "manage_pasteObjects" on the traverse to
> > > object.
> > >
> >
> > Thanks for the quick reply.
> >
> > Do you have an example of how one would do this, as I cannot quite
> > picture in my head how this should be approached?
>Attached...
>
>You would use it in the form:
>
> from request import getAuthRequest
>
> R=getAuthRequest() # your authenticated request object (sure,
>you modified USER and PASSWORD!)
>
> o= R.traverse(URL) # the (site relative) URL of the object you
>want to reach
>
> # whatever you want to do with "o"
khk
More information about the Zope
mailing list