[Mpuls-commits] r2636 - wasko/branches/2.0/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed May 5 10:31:20 CEST 2010
Author: torsten
Date: 2010-05-05 10:31:19 +0200 (Wed, 05 May 2010)
New Revision: 2636
Modified:
wasko/branches/2.0/mpulsweb/controllers/privacy.py
Log:
* mpulsweb/controllers/privacy.py (PrivacyController.decline): Check
consistence for the endpart of the current phase.
Modified: wasko/branches/2.0/mpulsweb/controllers/privacy.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/privacy.py 2010-05-05 08:28:43 UTC (rev 2635)
+++ wasko/branches/2.0/mpulsweb/controllers/privacy.py 2010-05-05 08:31:19 UTC (rev 2636)
@@ -8,7 +8,8 @@
from mpulsweb.lib.security import checkRole
from mpulsweb.lib.base import BaseController, render, c, h, session
-from mpulsweb.lib.anonymize import determineAnonymizedCaseEndPhaseName
+from mpulsweb.lib.anonymize import determineAnonymizedCaseEndPhaseName, \
+determineAnonymizedCaseEndPhase
from mpulsweb.model.phase import ConsistenceCheckException
from mpulsweb.controllers.case import MARKANONYMIZE_CONFIRM_TEXT, \
@@ -104,11 +105,13 @@
# Check if the case has set the minimum required fields.
# Thefore get a list of minimum required fields. This is usually the
# relevant date fields plus additionally some fields (e.g type of end
- # of cm)
+ # of cm) Further phase will be finished on decline. So check if the
+ # minimum fields in the endphase are present.
min_fields = g.mpuls_config.get('phases', 'minimal_fields_to_anonymize')
+ endphase = str(determineAnonymizedCaseEndPhase(case))
try:
- case.check_anonymizeability(fields=min_fields, only_on_endphase=False)
+ case.check_anonymizeability(fields=min_fields, phase=endphase)
except ConsistenceCheckException, e:
c.dialog_title = PRIVACY_DECLINE_DISALLOWED
c.dialog_text = h.literal(PRIVACY_DECLINE_DISALLOWED_TEXT % e.value)
More information about the Mpuls-commits
mailing list