[Mpuls-commits] r1446 - wasko/branches/2.0/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Feb 10 11:19:31 CET 2010
Author: torsten
Date: 2010-02-10 11:19:31 +0100 (Wed, 10 Feb 2010)
New Revision: 1446
Modified:
wasko/branches/2.0/mpulsweb/controllers/auth.py
Log:
* mpulsweb/controllers/auth.py (AuthController.accountDeactivated):
Copied from waskaweb.controllers.administration.
Modified: wasko/branches/2.0/mpulsweb/controllers/auth.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/auth.py 2010-02-10 10:13:32 UTC (rev 1445)
+++ wasko/branches/2.0/mpulsweb/controllers/auth.py 2010-02-10 10:19:31 UTC (rev 1446)
@@ -5,7 +5,7 @@
from pylons.controllers.util import abort, redirect_to
from mpulsweb.lib.base import BaseController, render
-from mpulsweb.lib.security import checkLogin, generateID, userIdentity
+from mpulsweb.lib.security import checkLogin, generateID, userIdentity, checkRole
log = logging.getLogger(__name__)
@@ -49,3 +49,12 @@
except KeyError:
log.error('Error while fetching username and password')
return self.login()
+
+ @checkRole(('admin_ka', 'cm_ka', 'pt_dlr'))
+ def accountDeactivated(self):
+ try:
+ del session['USER_AUTHORIZED']
+ session.save()
+ except KeyError:
+ pass
+ return render('/administration/account_deactivated.mako')
More information about the Mpuls-commits
mailing list