[Mpuls-commits] r5739 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Dec 22 17:11:53 CET 2011
Author: torsten
Date: 2011-12-22 17:11:51 +0100 (Thu, 22 Dec 2011)
New Revision: 5739
Modified:
base/trunk/mpulsweb/controllers/meta.py
Log:
Added new controller function to anonymize a meta case globally
Modified: base/trunk/mpulsweb/controllers/meta.py
===================================================================
--- base/trunk/mpulsweb/controllers/meta.py 2011-12-22 14:57:45 UTC (rev 5738)
+++ base/trunk/mpulsweb/controllers/meta.py 2011-12-22 16:11:51 UTC (rev 5739)
@@ -205,6 +205,36 @@
@confirm(header=N_('Withdraw agremment globally for synchronisation with'
' meta?'),
text=N_('Please note that disallowing the synchronisation globally'
+ ' with the meta case leads to the anonymization of the whole'
+ ' meta-case on the meta server. The data of the meta case'
+ ' will not be available to anybody anymore.'))
+ def withdraw_anonymize_metacase(self, id):
+ '''Will delete anonymize the projectdata in the metacase, deletes the link
+ and marks the metacase for anonymization.'''
+ case = self._loadCase(id)
+ meta = case.getMeta()
+ try:
+ meta.delete_incomplete_parts_and_anonymize()
+ session['meta_discretion_statement'] = False
+ session['meta_acceptance_statement'] = False
+ session.save()
+ return success(header=_('Agreement globally withdrawn.'),
+ text=_('The agremment for sychronisation of data'
+ ' with the meta case has succsessfully been'
+ ' withdrawn. Meta case has been marked for'
+ ' anonymization.'),
+ url_ok=url_for(controller="/meta", action="index",
+ id=id))
+ except MetaException, exc:
+ return self._handle_meta_exception(meta, exc,
+ "withdraw_anonymize_metacase",
+ _("Error! Agreement for"
+ " synchronisation not"
+ " withdrawn."))
+
+ @confirm(header=N_('Withdraw agremment globally for synchronisation with'
+ ' meta?'),
+ text=N_('Please note that disallowing the synchronisation globally'
' with the meta case leads to the deletion of the whole'
' meta-case on the meta server. The data of the meta case'
' will not be available to anybody anymore.'))
More information about the Mpuls-commits
mailing list