Commit a9f2e450 authored by matt@zope.com's avatar matt@zope.com

Put in a sanity check for permissions='string' in context setup; permissions

should not be a string, use permission='string' for that. The behavior
for iterating over all elements of a string is of course to create lots of
single-letter permissions.

This fixes Collector issue 22, from runyaga
parent 4c39d931
......@@ -175,6 +175,9 @@ class ProductContext:
OM=OFS.ObjectManager.ObjectManager
if permissions:
if type(permissions) is type(''): # You goofed it!
raise TypeError, ('Product context permissions should be a '
'list of permissions not a string', permissions)
for p in permissions:
if type(p) is tt:
p, default= p
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment