[Zope3-checkins] CVS: Zope3/src/zope/app/browser/security - permissionwidget.py:1.7.2.1
Jim Fulton
jim@zope.com
Tue, 18 Mar 2003 07:36:20 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/security
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app/browser/security
Modified Files:
Tag: local-utility-branch
permissionwidget.py
Log Message:
Checking in current code to the branch.
It may be in a state of non-working-ness. We'll fix that later.
We're currently trying to clean up the logic for adding configs.
=== Zope3/src/zope/app/browser/security/permissionwidget.py 1.7 => 1.7.2.1 ===
--- Zope3/src/zope/app/browser/security/permissionwidget.py:1.7 Fri Mar 7 16:14:37 2003
+++ Zope3/src/zope/app/browser/security/permissionwidget.py Tue Mar 18 07:35:49 2003
@@ -26,11 +26,17 @@
class BaseWidget:
def _convert(self, permission_id):
+ if not permission_id:
+ # No permission selected
+ return None
+
if type(permission_id) is unicode:
try:
permission_id = permission_id.encode('ascii')
except UnicodeError, v:
raise ConversionError("Invalid textual data", v)
+
+
if permission_id == 'zope.Public':
permission_id = CheckerPublic