[Mpuls-commits] r945 - in wasko/branches/2.0: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jan 27 12:39:05 CET 2010


Author: bh
Date: 2010-01-27 12:39:02 +0100 (Wed, 27 Jan 2010)
New Revision: 945

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/lib/search.py
Log:
* waskaweb/lib/search.py: Remove unused imports.  Import hasRole
directly from waskaweb.lib.security instead of accessing it via
helpers.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-27 11:35:56 UTC (rev 944)
+++ wasko/branches/2.0/ChangeLog	2010-01-27 11:39:02 UTC (rev 945)
@@ -1,5 +1,11 @@
 2010-01-27  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/lib/search.py: Remove unused imports.  Import hasRole
+	directly from waskaweb.lib.security instead of accessing it via
+	helpers.
+
+2010-01-27  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/templates/documents/case_new.mako: Adapt to helpers API
 	changes.
 

Modified: wasko/branches/2.0/waskaweb/lib/search.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/search.py	2010-01-27 11:35:56 UTC (rev 944)
+++ wasko/branches/2.0/waskaweb/lib/search.py	2010-01-27 11:39:02 UTC (rev 945)
@@ -35,7 +35,7 @@
 import psycopg2.extras
 
 from waskaweb.lib.db import db
-from waskaweb.lib.base import session, g, h, config
+from waskaweb.lib.security import hasRole
 
 SAVE_SEARCH = re.compile(r'[^\w:;\-\. ]', re.UNICODE)
 
@@ -179,7 +179,7 @@
             allowed_viewer = "TRUE"
         gender = (options.get('gender')
                   and "m.geschlecht = %s" % options.get('gender') or "TRUE")
-        allowed_viewer = (h.hasRole(['admin_ka', 'pb_ka'])
+        allowed_viewer = (hasRole(['admin_ka', 'pb_ka'])
                           and "TRUE" or allowed_viewer)
         editor = (options.has_key('editor')
                   and "m.bearbeiter_id = %s" % options.get('editor') or "TRUE")



More information about the Mpuls-commits mailing list