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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 23 14:43:47 CET 2010


Author: torsten
Date: 2010-03-23 14:43:46 +0100 (Tue, 23 Mar 2010)
New Revision: 2080

Modified:
   wasko/branches/2.0/jmdweb/controllers/administration.py
Log:
* jmdweb/controllers/administration.py: Import all from mpulsweb


Modified: wasko/branches/2.0/jmdweb/controllers/administration.py
===================================================================
--- wasko/branches/2.0/jmdweb/controllers/administration.py	2010-03-23 13:43:00 UTC (rev 2079)
+++ wasko/branches/2.0/jmdweb/controllers/administration.py	2010-03-23 13:43:46 UTC (rev 2080)
@@ -35,13 +35,13 @@
 from formencode import htmlfill
 from pylons.i18n import _
 
+from mpulsweb.lib.base import c, redirect_to, render, request, session
 from mpulsweb.lib.security import checkRole
+from mpulsweb.lib.validators import DeleteUserHelperForm
 from mpulsweb.model.user import UserObject, UserListObject
+from mpulsweb.model.case import MpulsCaseOverview, MpulsCaseBundle
 from mpulsweb.controllers.administration import AdministrationController as BaseAdministrationController
 
-from jmdweb.lib.base import c, redirect_to, render, request, session
-from jmdweb.lib.validators import DeleteUserHelperForm
-from jmdweb.model.case import CaseOverview, CaseBundle
 
 log = logging.getLogger(__name__)
 
@@ -69,7 +69,7 @@
     def index(self):
         redirect_to(action='overviewUser')
 
-    @checkRole('admin_ka')
+    @checkRole('admin')
     def deleteUser(self, id, confirmed='0'):
         id = self._checkInt(id)
         confirmed = self._checkBool(confirmed)
@@ -86,7 +86,7 @@
                 # Check if there are cases for which the user is the editor. If
                 # he is an editor then raise a dialog which allows the user to
                 # transfer the cases.
-                overview = CaseOverview()
+                overview = MpulsCaseOverview()
                 overview.search('editor:%s;'
                                 'state:1;state:2;state:3;state:4;state:5'
                                 % uo.id)
@@ -119,17 +119,17 @@
         except:
             return render('/tests/trace.mako')
 
-    @checkRole('admin_ka')
+    @checkRole('admin')
     def deleteUserHelper(self):
         validator = DeleteUserHelperForm()
-        all_cases = CaseOverview()
+        all_cases = MpulsCaseOverview()
         c.notification_for = DIALOG_CONFIRM_SETEDITOR
         c.form_errors = {}
         c.form_result = {}
         try:
             data = formencode.variabledecode.variable_decode(request.params)
             form_result = validator.to_python(data)
-            case_bundle = CaseBundle(form_result.get('case_id', []))
+            case_bundle = MpulsCaseBundle(form_result.get('case_id', []))
             new_editor = UserObject(form_result.get('editor'))
             del_user = UserObject(form_result.get('user_id'))
             all_cases.search('editor:%s;state:1;state:2;state:3;state:4;state:5'



More information about the Mpuls-commits mailing list