# HG changeset patch # User Sylvain Thénault # Date 1316773032 -7200 # Node ID d95a76df33a9967b56d28f591cce2cca58da008f # Parent 69cbb780dc838f47d89a8773bfc0dbe369bf9c32 [web] properly redirect when user login on loggedout view (closes #1954050) This avoid getting a "you've no access to this view" message diff -r 69cbb780dc83 -r d95a76df33a9 web/views/sessions.py --- a/web/views/sessions.py Mon Sep 26 09:31:54 2011 +0200 +++ b/web/views/sessions.py Fri Sep 23 12:17:12 2011 +0200 @@ -99,10 +99,10 @@ for forminternal_key in ('__form_id', '__domid', '__errorurl'): args.pop(forminternal_key, None) path = req.relative_path(False) - if path == 'login': + if path in ('login', 'logout') or req.form.get('vid') == 'loggedout': path = 'view' args['__message'] = req._('welcome %s !') % req.user.login - if 'vid' in req.form: + if 'vid' in req.form and req.form['vid'] != 'loggedout': args['vid'] = req.form['vid'] if 'rql' in req.form: args['rql'] = req.form['rql']