[Zope-CMF] CopySupport and FSPythonScripts?

Tres Seaver tseaver@palladion.com
Thu, 16 Aug 2001 11:51:51 -0400 (EDT)


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