[Mpuls-commits] r5709 - base/trunk/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Dec 15 12:32:53 CET 2011
Author: torsten
Date: 2011-12-15 12:32:51 +0100 (Thu, 15 Dec 2011)
New Revision: 5709
Modified:
base/trunk/mpulsweb/controllers/meta.py
Log:
Added new method to only disallow syncronisation without deleting anything.
This method is need later to only set syncpermission from within the upcoming
confirm dialog when opening a case asking for syncpermission. Similar to the
check privacy dialog.
Modified: base/trunk/mpulsweb/controllers/meta.py
===================================================================
--- base/trunk/mpulsweb/controllers/meta.py 2011-12-15 11:29:12 UTC (rev 5708)
+++ base/trunk/mpulsweb/controllers/meta.py 2011-12-15 11:32:51 UTC (rev 5709)
@@ -148,6 +148,31 @@
'''Return overview page with options for withdrawing the agreement.'''
return render('/meta/disallow.mako')
+ @confirm(header=N_('Disallow synchronisation with meta?'),
+ text=N_('Do your really want to disallow the synchronisation with'
+ ' the meta server? After that no sync is possible '
+ ' anymore!'))
+ def withdraw_only(self, id):
+ '''Will set flag to disallow the synchronisation to the metacase.'''
+ case = self._loadCase(id)
+ meta = case.getMeta()
+ try:
+ meta.disallow_sync()
+ session['meta_discretion_statement'] = False
+ session['meta_acceptance_statement'] = False
+ session.save()
+ return success(header=_('Synchronisation disallowed.'),
+ text=_('The sychronisation of data'
+ ' with the meta case has succsessfully been'
+ ' disallowed.'),
+ url_ok=url_for(controller="/meta", action="index",
+ id=id))
+ except MetaException, exc:
+ return self._handle_meta_exception(meta, exc,
+ "disallow_sync",
+ _("Error! synchronisation not"
+ " disallowed."))
+
@confirm(header=N_('Withdraw agremment for synchronisation with meta?'),
text=N_('Please note that disallowing the synchronisation with'
' the meta case leads to unlinking this case with its'
More information about the Mpuls-commits
mailing list