[Zope3-checkins] SVN: Zope3/branches/mgedmin-security/src/zope/security/manage Implement getSecurityPolicy.

Marius Gedminas marius at pov.lt
Wed May 12 14:33:46 EDT 2004


Log message for revision 24598:
Implement getSecurityPolicy.




-=-
Modified: Zope3/branches/mgedmin-security/src/zope/security/management.py
===================================================================
--- Zope3/branches/mgedmin-security/src/zope/security/management.py	2004-05-12 18:28:52 UTC (rev 24597)
+++ Zope3/branches/mgedmin-security/src/zope/security/management.py	2004-05-12 18:33:45 UTC (rev 24598)
@@ -24,6 +24,7 @@
 from zope.security.interfaces import ISecurityManagementSetup
 from zope.security.manager import SecurityManager
 from zope.security.manager import setSecurityPolicy as _setSecurityPolicy
+from zope.security.manager import getSecurityPolicy as _getSecurityPolicy
 from zope.security.context import SecurityContext
 
 moduleProvides(ISecurityManagement, ISecurityManagementSetup)
@@ -83,7 +84,7 @@
 
 def getSecurityPolicy():
     """Get the system default security policy."""
-    raise NotImplementedError # XXX
+    return _getSecurityPolicy()
 
 def setSecurityPolicy(aSecurityPolicy):
     """Set the system default security policy, and return the previous

Modified: Zope3/branches/mgedmin-security/src/zope/security/manager.py
===================================================================
--- Zope3/branches/mgedmin-security/src/zope/security/manager.py	2004-05-12 18:28:52 UTC (rev 24597)
+++ Zope3/branches/mgedmin-security/src/zope/security/manager.py	2004-05-12 18:33:45 UTC (rev 24598)
@@ -29,6 +29,9 @@
 from zope.testing.cleanup import addCleanUp
 addCleanUp(_clear)
 
+def getSecurityPolicy():
+    """Get the system default security policy."""
+    return _defaultPolicy
 
 def setSecurityPolicy(aSecurityPolicy):
     """Set the system default security policy.




More information about the Zope3-Checkins mailing list