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

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


Author: torsten
Date: 2010-02-09 12:02:27 +0100 (Tue, 09 Feb 2010)
New Revision: 1350

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


Modified: wasko/branches/2.0/mpulsweb/controllers/administration.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/administration.py	2010-02-09 10:57:54 UTC (rev 1349)
+++ wasko/branches/2.0/mpulsweb/controllers/administration.py	2010-02-09 11:02:27 UTC (rev 1350)
@@ -6,16 +6,28 @@
 
 from mpulsweb.lib.base import BaseController, render
 from mpulsweb.lib.security import checkRole
-from mpulsweb.model.user import UserListObject
+from mpulsweb.model.user import UserListObject, UserGroupList
 
 log = logging.getLogger(__name__)
 
 class AdministrationController(BaseController):
 
+    # USER
     @checkRole('admin_ka')
     def overviewUser(self):
         list = UserListObject()
         c.user_overview = list.getUserList()
         return render('/administration/overview_user.mako')
 
+    # USERGROUPS
+    @checkRole('admin_ka')
+    def overviewUserGroups(self):
+        # Get gid of usergroups so we can filter them out.
+        user = UserListObject()
+        filter = [u.gid for u in user.getUserList()]
+
+        list = UserGroupList()
+        c.group_overview = list.getGroupList(filter)
+        return render('/administration/overview_usergroups.mako')
+
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list