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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue May 4 13:00:27 CEST 2010


Author: torsten
Date: 2010-05-04 13:00:26 +0200 (Tue, 04 May 2010)
New Revision: 2613

Modified:
   wasko/branches/2.0/mpulsweb/controllers/administration.py
Log:
* mpulsweb/controllers/administration.py
  (AdministrationController.deleteUser): Added default phases to
  search_str to find all cases of the users which is up to be deleted.



Modified: wasko/branches/2.0/mpulsweb/controllers/administration.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/administration.py	2010-05-04 11:00:00 UTC (rev 2612)
+++ wasko/branches/2.0/mpulsweb/controllers/administration.py	2010-05-04 11:00:26 UTC (rev 2613)
@@ -14,6 +14,7 @@
 from mpulsweb.model.user import UserListObject, UserObject, UserGroupList, \
     UserGroup, UserGroupFactory
 from mpulsweb.model.case import MpulsCaseOverview, MpulsCaseBundle
+from mpulsweb.controllers.case_overview import default_phases 
 
 
 RESET_PASSWORD_CONFIRM = _('adm_reset_user_password')
@@ -230,9 +231,12 @@
             # he is an editor then raise a dialog which allows the user to
             # transfer the cases.
             overview = MpulsCaseOverview()
+            phases = []
+            for p in default_phases():
+                phases.append('phase:%s' % p)
             overview.search('editor:%s;'
-                            'state:1;state:2;state:3;state:4;state:5'
-                            % uo.id)
+                            'state:1;state:2;state:3;state:4;state:5;%s'
+                            % (uo.id, ";".join(phases)))
             if overview.getDatasets():
                 list = UserListObject()
                 filter = [u.id for u in list.getAdminList()]



More information about the Mpuls-commits mailing list