[Mpuls-commits] r5627 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Nov 18 22:16:44 CET 2011
Author: bh
Date: 2011-11-18 22:16:35 +0100 (Fri, 18 Nov 2011)
New Revision: 5627
Modified:
base/trunk/mpulsweb/controllers/formularpage.py
Log:
Check access permissions in FormularpageController.edit
by using the _load_current_case method to load the case and using the
new method _render_page to render the page instead of going through the
select method.
Implements the access checks for switching the form to edit mode for
mpuls/issue2367.
Modified: base/trunk/mpulsweb/controllers/formularpage.py
===================================================================
--- base/trunk/mpulsweb/controllers/formularpage.py 2011-11-18 21:09:43 UTC (rev 5626)
+++ base/trunk/mpulsweb/controllers/formularpage.py 2011-11-18 21:16:35 UTC (rev 5627)
@@ -124,9 +124,10 @@
@checkRole(('cm'))
def edit(self, id):
+ case = self._load_current_case()
session['render_mode'] = 'rw'
session.save()
- return self.select(id)
+ return self._render_page(case, id)
@checkRole(('admin', 'cm', 'pt_dlr'))
def show(self, id):
More information about the Mpuls-commits
mailing list