[Zope-CMF] CopySupport and FSPythonScripts?
Robert Rottermann
robert@redcor.ch
Thu, 16 Aug 2001 20:46:05 +0200
I just ran into a similar problem.
I created a CMF site for an conference.
Visitors can only view the sites (can not even join)
However they can register for the conference.
When the registree fills out a registration form I create an "Attendant"
object in a temporary folder.
This object is presented in a second form for confirmation.
Afterwards I want to move it to the "real" folder.
However as soon as the object is pasted into the destination folder the user
is presented with a login screen.
The only solution I found so far is to create a new object in the
destination folder and to copy the properties.
All this object creating and copying is done in a python script. Its has
every possible proxy role.
I tried to use something like
> > user = self.getMemberById(member_id)
> > newSecurityManager(None, user)
however I have the impression that I cant reach them from a script.
(for political reasons I would like to avoid to create a product or an
external method)
Is there a way to cut and paste the object the script created
programmatically ?
thanks for your time
Robert
----- Original Message -----
From: "Tres Seaver" <tseaver@palladion.com>
To: "seb bacon" <seb@jamkit.com>
Cc: <zope-cmf@zope.org>
Sent: Thursday, August 16, 2001 5:51 PM
Subject: Re: [Zope-CMF] CopySupport and FSPythonScripts?
> On Thu, 16 Aug 2001, seb bacon wrote:
>
> > * seb bacon <seb@jamkit.com> [010816 17:33]:
> > > Now I've hit on another problem: I can't paste anything into the
> > > member folder I've just created, because the user in the security
> > > context is Anonymous User. Has anyone got any suggestions for
> > > options? Could I physically manipulate the security context somehow
> > > to force the user to be logged in? Could I temporarily change all the
> > > permissions for Anonymous User? (nah, that would be wrong...)
> >
> > Hooray. I've worked out how to log someone in programmatically, which
> > is something I've been trying to do occasionally for ages:
> >
> > user = self.getMemberById(member_id)
> > newSecurityManager(None, user)
> >
> > Simple, but I wonder if there's any security implications of this
> > which I haven't seen? Hmm, I think I'll post to the zope list too, to
> > see if I get an answer.
> >
> > If this is OK, wouldn't it be a nicer way to do things than all that
> > redirecting or clicking on a link after you've joined stuff that's
> > been discussed previously?
>
> Unless you manage to get the credentials (the cookie) propagated
> back to the browser, your solution won't work beyond the first
> request. Except for that, it seems fine.
>
> --
> ===============================================================
> Tres Seaver tseaver@zope.com
> Zope Corporation "Zope Dealers" http://www.zope.com
>
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature
requests
>