[Mpuls-commits] r1714 - wasko/branches/2.0/waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 23 17:36:39 CET 2010
Author: torsten
Date: 2010-02-23 17:36:39 +0100 (Tue, 23 Feb 2010)
New Revision: 1714
Modified:
wasko/branches/2.0/waskaweb/controllers/case.py
Log:
* waskaweb/controllers/case.py (CaseController.organsation),
(CaseController.setEditorAction), (CaseController.setStandinAction):
Deleted.
Modified: wasko/branches/2.0/waskaweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/case.py 2010-02-23 16:33:14 UTC (rev 1713)
+++ wasko/branches/2.0/waskaweb/controllers/case.py 2010-02-23 16:36:39 UTC (rev 1714)
@@ -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
@@ -53,7 +52,6 @@
from waskaweb.lib.base import BaseController
from waskaweb.lib.search import INCONSISTENCY_CHECK_AFTER
#from waskaweb.lib.xmlimport import importFromXML
-from mpulsweb.lib.validators import SetStandinForm, SetEditorForm
from waskaweb.lib.validators import NewCaseForm, WiederaufnahmeCaseForm, \
NeuaufnahmeCaseForm
@@ -535,64 +533,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