[Zope] Testing security in a debug session?

Chris McDonough chrism@zope.com
27 Feb 2003 18:12:05 -0500


Something like this:

user = app.acl_users.getUser('foo')
from AccessControl.SecurityManagement import newSecurityManager
newSecurityManager(None, user)


On Thu, 2003-02-27 at 17:42, Paul Winkler wrote:
> how do I test as a particular user in a debug session?
> things like has_permission are failing because 
> getSecurityManager().getUser() returns 'Anonymous User'.
> 
> I remember seeing something about how to do this recently, but
> I can't find it for the life of me and i've been looking for
> hours :(
> 
> -- 
> 
> Paul Winkler
> http://www.slinkp.com
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )