Fix a bug if you have no roles at all
This could not happen currently, but might happen later on if a group
is defined that does not have an 'anybody' membership.
Patch by: Sverre Rabbelier
--- a/app/soc/views/helper/access.py Fri Feb 13 23:18:39 2009 +0000
+++ b/app/soc/views/helper/access.py Sat Feb 14 14:10:56 2009 +0000
@@ -967,6 +967,9 @@
if self.hasMembership(value, django_args):
roles.append(key)
+ if not roles:
+ roles = ['deny']
+
get_args.setlist('read_access', roles)
get_args._mutable = mutable