[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Security/tests - testSecurityManager.py:1.1.2.4
Tres Seaver
tseaver@zope.com
Fri, 30 Nov 2001 22:51:14 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Security/tests
In directory cvs.zope.org:/tmp/cvs-serv1658/tests
Modified Files:
Tag: Zope-3x-branch
testSecurityManager.py
Log Message:
- Refactor trivial security policies into their own module,
'SimpleSecurityPolicies'; rename 'DefaultSecurityPolicy' =>
'ParanoidSecurityPolicy'.
=== Zope3/lib/python/Zope/App/Security/tests/testSecurityManager.py 1.1.2.3 => 1.1.2.4 ===
from Interface import verify
-from Zope.App.Security.ISecurityPolicy import ISecurityPolicy
+from Zope.App.Security.SimpleSecurityPolicies import PermissiveSecurityPolicy
from Zope.App.Security.SecurityContext import SecurityContext
from Zope.Exceptions import Unauthorized
-
-class PermissiveSecurityPolicy:
- """
- Allow all.
- """
- __implements__ = ISecurityPolicy
-
- def validate( self, name, value, context ):
- pass
-
- def checkPermission( self, permission, object, context ):
- return 1
class DummyExecutable: