[Mpuls-commits] r1712 - wasko/branches/2.0/jmdweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Feb 23 17:32:51 CET 2010


Author: torsten
Date: 2010-02-23 17:32:50 +0100 (Tue, 23 Feb 2010)
New Revision: 1712

Modified:
   wasko/branches/2.0/jmdweb/controllers/case.py
Log:
* jmdweb/controllers/case.py (CaseController.organsation),
(CaseController.setEditorAction), (CaseController.setStandinAction):
Deleted.


Modified: wasko/branches/2.0/jmdweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/controllers/case.py	2010-02-23 16:27:20 UTC (rev 1711)
+++ wasko/branches/2.0/jmdweb/controllers/case.py	2010-02-23 16:32:50 UTC (rev 1712)
@@ -44,7 +44,6 @@
 from mpulsweb.lib.navigation import get_navigation
 from mpulsweb.lib.security import checkRole
 
-from mpulsweb.model.user import UserGroupList, UserListObject
 from mpulsweb.model.appointment import CaseAppointmentFactory
 from mpulsweb.model.logbook import LogbookEntry
 
@@ -54,8 +53,7 @@
 from jmdweb.lib.base import BaseController
 from jmdweb.lib.search import INCONSISTENCY_CHECK_AFTER
 #from jmdweb.lib.xmlimport import importFromXML
-from jmdweb.lib.validators import NewCaseForm, SetStandinForm, \
-     SetEditorForm, WiederaufnahmeCaseForm, \
+from jmdweb.lib.validators import NewCaseForm, WiederaufnahmeCaseForm, \
      NeuaufnahmeCaseForm
 
 from jmdweb.model.statement import PrivacyStatement
@@ -384,64 +382,6 @@
     def createExportScheme(self):
         return render('casemanagement/create_export_scheme.mako')
 
-    ##@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')
-
-
-    @checkRole('admin_ka')
-    def setEditorAction(self):
-        validator = SetEditorForm()
-        try:
-            form_result = validator.to_python(request.params)
-            case = self._loadCase(form_result.get('case_id'))
-            case.setEditor(form_result.get('editor'))
-            c.status_msg = h.status_message("Bearbeiter erfolgreich gesetzt.")
-            return self.organisation(form_result.get('case_id'))
-        except formencode.Invalid, error:
-            c.form_result = error.value
-            c.form_errors = error.error_dict or {}
-            c.status_msg = h.status_message("Fehler! Bearbeiter nicht gesetzt.")
-            return render('/casemanagement/organisation.mako')
-
-    @checkRole(('admin_ka', 'cm_ka'))
-    def setStandinAction(self):
-        validator = SetStandinForm()
-        data = formencode.variabledecode.variable_decode(request.params)
-        try:
-            form_result = validator.to_python(data)
-            case = self._loadCase(form_result.get('case_id'))
-            standin = case.getStandin()
-            standin.setGroups(form_result.get('standin'))
-            c.status_msg = h.status_message("Vertretung erfolgreich gesetzt.")
-            return self.organisation(form_result.get('case_id'))
-        except formencode.Invalid, error:
-            c.form_result = error.value
-            c.form_errors = error.error_dict or {}
-            c.status_msg = h.status_message("Fehler! Vertretung nicht gesetzt.")
-            return render('/casemanagement/organisation.mako')
-
     @checkRole('cm_ka')
     @checkPrivacyStatement('keepActive')
     def keepActive(self, id, confirmed):



More information about the Mpuls-commits mailing list