Mercurial > p > roundup > code
changeset 6574:20d4ca71d458
Fix unwanted redirect from search index to edit on login error
The search action saves searches including:
@template=index|search
The code strips:
@template=index
but not the error condition template.
So when an non-logged in user uses a search with
@template=index|search and fails to log in, their displayed page is
the search edit page (template search) not the search display (template
index).
This change strips both forms when saving. I don't know if this needs
to be generalized to strip additional templates. But it solves te
orignal issue with search displays jumping to edit mode on login
failure.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 24 Dec 2021 15:10:40 -0500 |
| parents | 4b627102b344 |
| children | c3c636feace3 |
| files | roundup/cgi/actions.py |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Thu Dec 23 17:24:51 2021 -0500 +++ b/roundup/cgi/actions.py Fri Dec 24 15:10:40 2021 -0500 @@ -464,7 +464,7 @@ different from 'index' """ template = self.getFromForm('template') - if template and template != 'index': + if template and template not in ['index', 'index|search']: return req.indexargs_url('', {'@template': template})[1:] return req.indexargs_url('', {})[1:]
