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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 23 15:40:56 CET 2010


Author: torsten
Date: 2010-02-23 15:40:55 +0100 (Tue, 23 Feb 2010)
New Revision: 1694

Added:
   wasko/branches/2.0/mpulsweb/controllers/case.py
Log:
* mpulsweb/controllers/case.py (CaseController): New.



Added: wasko/branches/2.0/mpulsweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/case.py	2010-02-23 14:08:38 UTC (rev 1693)
+++ wasko/branches/2.0/mpulsweb/controllers/case.py	2010-02-23 14:40:55 UTC (rev 1694)
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+import logging
+
+from pylons import request, response, session, tmpl_context as c
+from pylons.controllers.util import abort, redirect_to
+
+from mpulsweb.lib.base import BaseController, render
+from mpulsweb.lib.security import checkRole
+
+log = logging.getLogger(__name__)
+
+class CaseController(BaseController):
+
+    @checkRole(('admin_ka', 'cm_ka'))
+    def organisation(self, id):
+        id = self._checkInt(id)
+        ulist = UserListObject()
+        list = UserGroupList()
+        c.case = self._loadCase(id)
+        c.standin = c.case.getStandin()
+        c.editor = c.case.getEditor()
+        c.current_user = session['USER_AUTHORIZED']
+
+        # group list for standin
+        filter = [u.gid for u in ulist.getAdminList()]
+        filter.append(c.editor.gid)
+        filter2 = filter[:]
+        filter.append(c.current_user.gid)
+        c.group_list = list.getGroupList(filter)
+        c.group_list2 = list.getGroupList(filter2)
+
+        # userlist for editor
+        filter3 = [u.id for u in ulist.getAdminList()]
+        filter3.append(c.current_user.id)
+        filter3.append(c.editor.id)
+        c.user_list = ulist.getUserList(filter3)
+        return render('/casemanagement/organisation.mako')
+
+# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list