[Zope3-checkins] SVN: Zope3/branches/jim-call-checkers/src/zope/security/checker.py Made consistent with the c code and tolerant of no get_permissions.

Jim Fulton jim at zope.com
Fri Oct 7 19:20:45 EDT 2005


Log message for revision 38913:
  Made consistent with the c code and tolerant of no get_permissions.
  

Changed:
  U   Zope3/branches/jim-call-checkers/src/zope/security/checker.py

-=-
Modified: Zope3/branches/jim-call-checkers/src/zope/security/checker.py
===================================================================
--- Zope3/branches/jim-call-checkers/src/zope/security/checker.py	2005-10-07 22:31:43 UTC (rev 38912)
+++ Zope3/branches/jim-call-checkers/src/zope/security/checker.py	2005-10-07 23:20:45 UTC (rev 38913)
@@ -180,7 +180,8 @@
 
     def permission_id(self, name):
         'See INameBasedChecker'
-        return self.get_permissions.get(name)
+        if self.get_permissions:
+            return self.get_permissions.get(name)
 
     def setattr_permission_id(self, name):
         'See INameBasedChecker'



More information about the Zope3-Checkins mailing list