[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/securitypolicy/grantinfo.py Change to return Unset when there are no grants, to be consistent with

Jim Fulton jim at zope.com
Tue Oct 19 15:17:06 EDT 2004


Log message for revision 28218:
  Change to return Unset when there are no grants, to be consistent with
  the interface.
  

Changed:
  U   Zope3/trunk/src/zope/app/securitypolicy/grantinfo.py

-=-
Modified: Zope3/trunk/src/zope/app/securitypolicy/grantinfo.py
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/grantinfo.py	2004-10-19 19:16:07 UTC (rev 28217)
+++ Zope3/trunk/src/zope/app/securitypolicy/grantinfo.py	2004-10-19 19:17:06 UTC (rev 28218)
@@ -15,6 +15,7 @@
 
 $Id$
 """
+from zope.app.security.settings import Unset
 
 from zope.app.securitypolicy.interfaces import IGrantInfo
 
@@ -36,6 +37,7 @@
 del AnnotationRolePermissionManager
 
 
+
 class AnnotationGrantInfo(object):
 
     prinper = prinrole = permrole = {}
@@ -64,6 +66,7 @@
         prinper = self.prinper.get(principal)
         if prinper:
             return prinper.get(permission)
+        return Unset
 
     def getRolesForPermission(self, permission):
         permrole = self.permrole.get(permission)



More information about the Zope3-Checkins mailing list