[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/security/ Merged from trunk 25919:

Jim Fulton jim at zope.com
Fri Jul 2 15:31:42 EDT 2004


Log message for revision 26057:
Merged from trunk 25919:
Removed unused NonPrivateChecker



-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/security/checker.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/security/checker.py	2004-07-02 19:28:16 UTC (rev 26056)
+++ Zope3/branches/ZopeX3-3.0/src/zope/security/checker.py	2004-07-02 19:31:42 UTC (rev 26057)
@@ -451,15 +451,6 @@
 
     return Checker(data.get)
 
-def NonPrivateChecker(permission_id = CheckerPublic):
-
-    def check(name, permission_id=permission_id):
-        if name.startswith('_'):
-            return None
-        return permission_id
-
-    return Checker(check)
-
 def selectChecker(object):
     """Get a checker for the given object
 

Modified: Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_checker.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_checker.py	2004-07-02 19:28:16 UTC (rev 26056)
+++ Zope3/branches/ZopeX3-3.0/src/zope/security/tests/test_checker.py	2004-07-02 19:31:42 UTC (rev 26057)
@@ -289,12 +289,6 @@
         self.assertEqual(checker.permission_id('z'), 'p4')
         self.assertEqual(checker.permission_id('zzz'), None)
 
-    def testNonPrivateChecker(self):
-        from zope.security.checker import NonPrivateChecker
-        checker = NonPrivateChecker('p')
-        self.assertEqual(checker.permission_id('z'), 'p')
-        self.assertEqual(checker.permission_id('_z'), None)
-
     def testAlwaysAvailable(self):
         from zope.security.checker import NamesChecker
         checker = NamesChecker(())



More information about the Zope3-Checkins mailing list