cb9e10481f35445a0155bb14bb1f0aaf027f1543
[GroupUserFolder.git] / skins / gruf / prefs_group_manage.cpy
1 ## Script (Python) "prefs_group_manage"
2 ##bind container=container
3 ##bind context=context
4 ##bind namespace=
5 ##bind script=script
6 ##bind subpath=traverse_subpath
7 ##parameters=
8 ##title=Manage groups
9 ##
10 REQUEST=context.REQUEST
11 groupstool=context.portal_groups
12
13 groups=[group[len('group_'):]
14 for group in REQUEST.keys()
15 if group.startswith('group_')]
16
17 for group in groups:
18 roles=REQUEST['group_'+group]
19 groupstool.editGroup(group, roles = roles, REQUEST=context.REQUEST, )
20
21
22 delete=REQUEST.get('delete',[])
23 groupstool.removeGroups(delete, REQUEST=context.REQUEST,)
24
25 portal_status_message="Changes made."
26 return state.set(portal_status_message=portal_status_message)