[Mpuls-commits] r5609 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Nov 18 17:17:58 CET 2011
Author: bh
Date: 2011-11-18 17:17:48 +0100 (Fri, 18 Nov 2011)
New Revision: 5609
Modified:
base/trunk/mpulsweb/controllers/case.py
Log:
Do not check editability in the case controller where appropriate.
This means calling _loadCase with read_only=True in the actions
digest, printAll, copy, organisation, formletter.
Modified: base/trunk/mpulsweb/controllers/case.py
===================================================================
--- base/trunk/mpulsweb/controllers/case.py 2011-11-18 15:18:03 UTC (rev 5608)
+++ base/trunk/mpulsweb/controllers/case.py 2011-11-18 16:17:48 UTC (rev 5609)
@@ -48,7 +48,7 @@
@checkRole(('admin', 'cm', 'pt_dlr'))
def digest(self, id):
id = self._checkInt(id)
- case = self._loadCase(id)
+ case = self._loadCase(id, read_only=True)
c.case = case
c.last_access = case.getState().getAccessTime()
c.daysToMaxSavetime = case.getState().daysToMaxSavetime()
@@ -514,7 +514,7 @@
def printAll(self, id, empty='0'):
c.print_version = 1
out = []
- case = self._loadCase(id)
+ case = self._loadCase(id, read_only=True)
c.case = case
render_mode = session['render_mode']
session['render_mode'] = 'ro'
@@ -654,7 +654,7 @@
def copy(self, id, confirmed):
id = self._checkInt(id)
confirmed = self._checkBool(confirmed)
- case = self._loadCase(id)
+ case = self._loadCase(id, read_only=True)
if confirmed:
case.copy()
case.checkValidity()
@@ -718,7 +718,7 @@
id = self._checkInt(id)
ulist = UserListObject()
list = UserGroupList()
- c.case = self._loadCase(id)
+ c.case = self._loadCase(id, read_only=True)
c.standin = c.case.getStandin()
c.editor = c.case.getEditor()
c.current_user = session['USER_AUTHORIZED']
@@ -838,7 +838,7 @@
def formletter(self, id, letterid=1):
id = self._checkInt(id)
- case = self._loadCase(id)
+ case = self._loadCase(id, read_only=True)
d, o = case.formletter(letterid)
export = FormletterExport([d], o).export()
return self._download_data(export, "application/msexcel", "xls")
More information about the Mpuls-commits
mailing list