[Mpuls-commits] r1362 - wasko/branches/2.0/mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 9 12:44:15 CET 2010


Author: torsten
Date: 2010-02-09 12:44:13 +0100 (Tue, 09 Feb 2010)
New Revision: 1362

Modified:
   wasko/branches/2.0/mpulsweb/controllers/administration.py
Log:
* mpulsweb/controllers/administration.py 
  (AdministrationController.editUserGroup): Copied from waskaweb


Modified: wasko/branches/2.0/mpulsweb/controllers/administration.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/administration.py	2010-02-09 11:30:54 UTC (rev 1361)
+++ wasko/branches/2.0/mpulsweb/controllers/administration.py	2010-02-09 11:44:13 UTC (rev 1362)
@@ -48,4 +48,24 @@
         c.groupmember = groupmember
         return render('/administration/show_usergroup.mako')
 
+    @checkRole('admin_ka')
+    def editUserGroup(self, id=None):
+        id = self._checkInt(id)
+        factory = UserGroupFactory()
+        group = factory.load(id)
+        memberlist = group.getUser().getUserList()
+        c.form_errors = {}
+        c.form_result = {'name': group.name,
+                         'id': group.id,
+                         'standin': [user.id for user in memberlist]}
+        c.group = group
+        userlist = UserListObject()
+        admins = userlist.getAdminList()
+        c.userlist = userlist.getUserList(filter=[u.id for u in admins])
+        form = render('/administration/edit_usergroup.mako')
+        return htmlfill.render(unicode(form, 'utf-8'),
+                               c.form_result,
+                               c.form_errors,
+                               auto_insert_errors=False)
+
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list