[Mpuls-commits] r5371 - in base/trunk/mpulsweb: controllers lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 19 17:03:18 CEST 2011


Author: torsten
Date: 2011-09-19 17:03:18 +0200 (Mon, 19 Sep 2011)
New Revision: 5371

Modified:
   base/trunk/mpulsweb/controllers/case_bundle.py
   base/trunk/mpulsweb/lib/security.py
Log:
Renamed checkFeature in check_feature


Modified: base/trunk/mpulsweb/controllers/case_bundle.py
===================================================================
--- base/trunk/mpulsweb/controllers/case_bundle.py	2011-09-19 15:00:10 UTC (rev 5370)
+++ base/trunk/mpulsweb/controllers/case_bundle.py	2011-09-19 15:03:18 UTC (rev 5371)
@@ -12,7 +12,7 @@
 from mpulsweb.lib.translation import _, ungettext
 from mpulsweb.lib.base import c, render, request, session, BaseController
 from mpulsweb.lib.helpers import url_for
-from mpulsweb.lib.security import checkRole, checkFeature
+from mpulsweb.lib.security import checkRole, check_feature
 from mpulsweb.lib.validators import BundleActionForm, SetBundleEditorForm, \
     SetBundleStandinForm, ExportSelectorValidator
 from mpulsweb.lib.helper.filters import NA
@@ -598,7 +598,7 @@
     # EXPORT
     def export(self, type="XML"):
         # check if feature is enabled or raise execption
-        checkFeature('case-module', 'export%s' % type)
+        check_feature('case-module', 'export%s' % type)
         c.context = "../main.mako"
         case_bundle = session.get('casebundle')
         # only pages that are not invisible can be selected by the user.
@@ -628,7 +628,7 @@
         form_result = validator.to_python(request.params)
         exporttype = form_result.get('exporttype')
         # check if feature is enabled or raise execption
-        checkFeature('case-module', 'export%s' % exporttype)
+        check_feature('case-module', 'export%s' % exporttype)
         exportanonym = form_result.get('exportanonym')
         exportselection = form_result.get('exportselection')
         num, export = case_bundle.export(exporttype,

Modified: base/trunk/mpulsweb/lib/security.py
===================================================================
--- base/trunk/mpulsweb/lib/security.py	2011-09-19 15:00:10 UTC (rev 5370)
+++ base/trunk/mpulsweb/lib/security.py	2011-09-19 15:03:18 UTC (rev 5371)
@@ -420,7 +420,7 @@
     except KeyError:
         return False
 
-def checkFeature(sec, feature):
+def check_feature(sec, feature):
     '''Helper function which checks if the feature is enabled in mpuls_config.
     If not raise an 404 Not Found on default.'''
     if not g.mpuls_config.is_enabled(sec, feature):



More information about the Mpuls-commits mailing list