[gen] Bugfix: in batch mode (Zope 'zopectl run'), the Appy user must be 'system'.

This commit is contained in:
Gaetan Delannay 2014-03-18 12:11:21 +01:00
parent 4515eb1f80
commit 889289407f
2 changed files with 11 additions and 2 deletions

View file

@ -53,6 +53,7 @@ else:
# Zope was initialized in a minimal way. Complete Zope install.
from Testing import makerequest
app = makerequest.makerequest(app)
app.REQUEST._fake_ = True
# Log as Zope admin
from AccessControl.SecurityManagement import newSecurityManager
user = app.acl_users.getUserById(zopeUser)