[Zope-CVS] CVS: Zope3 - z3.py:1.4
Jim Fulton
jim@zope.com
Tue, 13 Aug 2002 13:46:42 -0400
Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv18338
Modified Files:
z3.py
Log Message:
Introduced a system user
(Zope.Security.SecurityManagement.system_user)
that has all permissions. This was necessary so startup code and
testing code can avoid authorization failures.
=== Zope3/z3.py 1.3 => 1.4 ===
--- Zope3/z3.py:1.3 Fri Jun 14 14:51:10 2002
+++ Zope3/z3.py Tue Aug 13 13:46:12 2002
@@ -45,11 +45,20 @@
from Zope.Configuration.xmlconfig import XMLConfig
+ # Set user to system_user, so we can do anything we want
+ from Zope.Security.SecurityManagement import system_user
+ from Zope.Security.SecurityManagement import newSecurityManager
+ newSecurityManager(system_user)
+
# Load server-independent site config
XMLConfig(os.path.join(dir, 'site.zcml'))()
# Load server config
XMLConfig(os.path.join(dir, 'zserver.zcml'))()
+
+ # Reset user
+ from Zope.Security.SecurityManagement import noSecurityManager
+ noSecurityManager()
try:
asyncore.loop()