[Mpuls-commits] r3815 - in base/trunk: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 28 20:11:08 CEST 2010


Author: bh
Date: 2010-09-28 20:11:06 +0200 (Tue, 28 Sep 2010)
New Revision: 3815

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/search.py
Log:
* mpulsweb/lib/search.py (CaseSearch.get_allowed_viewer_clause):
Handle one more case of check boxes where checking none is
equivalent to checking all: if neither 'own' nor 'standin' is
selected, simply return TRUE to match all cases.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-09-28 17:08:17 UTC (rev 3814)
+++ base/trunk/ChangeLog	2010-09-28 18:11:06 UTC (rev 3815)
@@ -1,5 +1,12 @@
 2010-09-28  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/search.py (CaseSearch.get_allowed_viewer_clause):
+	Handle one more case of check boxes where checking none is
+	equivalent to checking all: if neither 'own' nor 'standin' is
+	selected, simply return TRUE to match all cases.
+
+2010-09-28  Bernhard Herzog  <bh at intevation.de>
+
 	Change the search semantics for choices represented as check
 	boxes: If None are checked, do not consider the corresponding
 	search parameter at all, making it equivalent to checking all of

Modified: base/trunk/mpulsweb/lib/search.py
===================================================================
--- base/trunk/mpulsweb/lib/search.py	2010-09-28 17:08:17 UTC (rev 3814)
+++ base/trunk/mpulsweb/lib/search.py	2010-09-28 18:11:06 UTC (rev 3815)
@@ -291,17 +291,20 @@
             return "TRUE"
 
         which_user = 0
-        allowed_viewer = "FALSE"
+        allowed_viewer = "TRUE"
+
         if options.has_key('own'):
             which_user += 2
         if options.has_key('standin'):
             which_user += 1
+
         if which_user == 1:
             allowed_viewer = "m.bearbeiter_id <> %s" % options.get('standin')
         if which_user == 2:
             allowed_viewer = "m.bearbeiter_id = %s" % options.get('own')
         if which_user == 3:
             allowed_viewer = "TRUE"
+
         return allowed_viewer
 
     def get_editor_clause(self, options):



More information about the Mpuls-commits mailing list