[Checkins] SVN: z3c.form/trunk/src/z3c/form/testing.py Cleanup.
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Mar 25 00:22:27 EDT 2009
Log message for revision 98349:
Cleanup.
Changed:
U z3c.form/trunk/src/z3c/form/testing.py
-=-
Modified: z3c.form/trunk/src/z3c/form/testing.py
===================================================================
--- z3c.form/trunk/src/z3c/form/testing.py 2009-03-25 04:21:39 UTC (rev 98348)
+++ z3c.form/trunk/src/z3c/form/testing.py 2009-03-25 04:22:26 UTC (rev 98349)
@@ -56,7 +56,8 @@
def toFieldValue(self, value):
if value is None or value == '':
value = self.widget.request.get(self.widget.name+'.testing', '')
- encoding = self.widget.request.get(self.widget.name+'.encoding', 'plain')
+ encoding = self.widget.request.get(
+ self.widget.name+'.encoding', 'plain')
# allow for the case where the file contents are base64 encoded.
if encoding!='plain':
@@ -78,21 +79,13 @@
def __init__(self, loggedIn=False, allowedPermissions=()):
self.loggedIn = loggedIn
- self.allowedPermissions = allowedPermissions
+ self.allowedPermissions = allowedPermissions + (checker.CheckerPublic,)
def __call__(self, *participations):
self.participations = []
return self
- def add(self, participation):
- pass
-
- def remove(self, participation):
- pass
-
def checkPermission(self, permission, object):
- if permission is checker.CheckerPublic:
- return True
if self.loggedIn:
if permission in self.allowedPermissions:
return True
More information about the Checkins
mailing list