Commit 4a705c69 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added support to save Owner in NuxUs. impl. and some comments


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5218 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 430f6301
......@@ -336,7 +336,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ):
# Save the owner
for group, role_list in old_group_list:
if 'Owner' in role_list:
if group not in group_id_role_dict.keys():
if not group_id_role_dict.has_key(group):
group_id_role_dict[group] = ('Owner',)
else:
group_id_role_dict[group].append('Owner')
......@@ -346,10 +346,19 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ):
else: # NuxUserGroups implementation
# Clean old group roles
old_group_list = object.get_local_group_roles()
# We duplicate role settings to mimic PAS
object.manage_delLocalGroupRoles([x[0] for x in old_group_list])
object.manage_delLocalRoles([x[0] for x in old_group_list])
# Save the owner
for group, role_list in old_group_list:
if 'Owner' in role_list:
if not group_id_role_dict.has_key(group):
group_id_role_dict[group] = ('Owner',)
else:
group_id_role_dict[group].append('Owner')
# Assign new roles
for group, role_list in group_id_role_dict.items():
# We duplicate role settings to mimic PAS
object.manage_addLocalGroupRoles(group, role_list)
object.manage_addLocalRoles(group, role_list)
......
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