[Zope3-checkins]
SVN: Zope3/branches/mgedmin-security/src/zope/app/_app.py
Changed zope.app to use interactions instead of
newSecurityManager for app
Marius Gedminas
marius at pov.lt
Wed May 12 16:48:16 EDT 2004
Log message for revision 24609:
Changed zope.app to use interactions instead of newSecurityManager for app
configuration.
-=-
Modified: Zope3/branches/mgedmin-security/src/zope/app/_app.py
===================================================================
--- Zope3/branches/mgedmin-security/src/zope/app/_app.py 2004-05-12 20:40:35 UTC (rev 24608)
+++ Zope3/branches/mgedmin-security/src/zope/app/_app.py 2004-05-12 20:48:10 UTC (rev 24609)
@@ -21,9 +21,20 @@
from zope.publisher.publish import publish as _publish, debug_call
from zope.publisher.browser import TestRequest
from zope.app.publication.browser import BrowserPublication
+from zope.security.interfaces import IParticipation
+from zope.security.management import system_user
+from zope.interface import implements
__metaclass__ = type
+
+class SystemConfigurationParticipation:
+ implements(IParticipation)
+
+ principal = system_user
+ interaction = None
+
+
_configured = 0
def config(file, execute=True):
"Configure site globals"
@@ -35,16 +46,15 @@
from zope.configuration import xmlconfig
# Set user to system_user, so we can do anything we want
- from zope.security.management import system_user
- from zope.security.management import newSecurityManager
- newSecurityManager(system_user)
+ from zope.security.management import newInteraction
+ newInteraction(SystemConfigurationParticipation())
# Load server-independent site config
context = xmlconfig.file(file, execute=execute)
# Reset user
- from zope.security.management import noSecurityManager
- noSecurityManager()
+ from zope.security.management import endInteraction
+ endInteraction()
_configured = execute
More information about the Zope3-Checkins
mailing list