[Zope] Authentication from a script

Dieter Maurer dieter@handshake.de
Mon, 11 Feb 2002 22:39:29 +0100


Marius Gedminas writes:
 > On Fri, Feb 08, 2002 at 11:10:48PM +0100, Dieter Maurer wrote:
 > > Marius Gedminas writes:
 > >  > We are using ZUnit for our automated unit test suite....
 > >  > However we are now planning to switch to the new API (SecurityGetUser
 > >  > etc.), and it is unclear how we can substitute a different user object
 > >  > in our tests.
 > > Look at "AccessControl.SecurityManagement.newSecurityManager".
 > 
 > Thanks.  I actually found this method a day after posting my question
 > here, but I still wasn't sure if this was a "legal" way or just a hack
 > messing with the internals that should not be touched.
I think, you should not expect an official method for impersonalization.

   "newSecurityManager" is internal, undocumented and may disappear 
   in future Zope versions. But, I think, it is the best thing you
   have currently for your purpose...


Dieter