Déplacement pour eggification.
[Plinn.git] / Products / Plinn / skins / control / append_groups_in_group.py
diff --git a/Products/Plinn/skins/control/append_groups_in_group.py b/Products/Plinn/skins/control/append_groups_in_group.py
new file mode 100755 (executable)
index 0000000..6f79266
--- /dev/null
@@ -0,0 +1,13 @@
+##parameters=groupId, append_groups=[], ajax='', REQUEST=None
+
+gtool = context.portal_groups
+group = gtool.getGroupById(groupId)
+
+for id in append_groups :
+       group.addGroup(id)
+
+if REQUEST is not None :
+       from ZTUtils import make_query as mq
+       url = context.portal_url()
+       red = REQUEST.RESPONSE.redirect
+       return red('%s/groups_members?%s#assign_groups' % (url, mq(group=groupId, ajax=ajax)))
\ No newline at end of file