Commit 5d4df59c authored by 's avatar

Fixed bug where user.roles could be passed by bobo as '' or None instead of an...

Fixed bug where user.roles could be passed by bobo as '' or None instead of an empty list, causing 'in' statements to fail
parent e799bb45
"""Access control package""" """Access control package"""
__version__='$Revision: 1.35 $'[11:-2] __version__='$Revision: 1.36 $'[11:-2]
from PersistentMapping import PersistentMapping from PersistentMapping import PersistentMapping
...@@ -174,6 +174,7 @@ class UserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager, ...@@ -174,6 +174,7 @@ class UserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
title ='Illegal value', title ='Illegal value',
message='Password and confirmation do not match', message='Password and confirmation do not match',
action ='manage_main') action ='manage_main')
if not roles: roles=[]
if 'Shared' in roles: if 'Shared' in roles:
return MessageDialog( return MessageDialog(
title ='Illegal value', title ='Illegal value',
...@@ -198,6 +199,7 @@ class UserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager, ...@@ -198,6 +199,7 @@ class UserFolder(Implicit, Persistent, Navigation, Tabs, RoleManager,
title ='Illegal value', title ='Illegal value',
message='Password and confirmation do not match', message='Password and confirmation do not match',
action ='manage_main') action ='manage_main')
if not roles: roles=[]
if 'Shared' in roles: if 'Shared' in roles:
return MessageDialog( return MessageDialog(
title ='Illegal value', title ='Illegal value',
......
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