https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43805

--- Comment #3 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 210193
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=210193&action=edit
Bug 43805: (follow-up) Log back in on the page the user was on

The login form posts to the script of the page, and dropped the path
info. For the Vue pages served through a rewrite rule that is the route
of the page: a user whose session timed out on
/cgi-bin/koha/admin/record_sources/edit/3 got to
/cgi-bin/koha/admin/record_sources.pl after logging in, with the page
left empty because the router only knows the URLs without the extension.

* Koha::AuthUtils::get_script_name, which gives the action of the login
  form, now keeps the path info, so the form posts to
  .../record_sources.pl/edit/3
* The rewrite rules leave the script alone when it is requested with a
  path info too, not only on its own
* The Vue pages take the extension out of the address before the router
  reads it, keeping the route, the query string and the hash, so that the
  user lands on the same page as before the timeout, on the same URL

To test:
1. Apply the patches, restart_all and rebuild the JavaScript
   (yarn js:build). In KTD the Apache configuration is generated when it
   starts, so it has to be regenerated for the rewrite rules
2. Log in, then visit /cgi-bin/koha/admin/record_sources.pl and
   /cgi-bin/koha/admin/record_sources.pl/add
   => The pages load, at the URL without the .pl
3. Open /cgi-bin/koha/admin/record_sources/add, log out in another tab,
   reload the page and log in
   => You land on the form to add a record source, not a 404 or an
      empty page. Same for /cgi-bin/koha/admin/circulation_triggers/add
4. prove t/db_dependent/AuthUtils.t
5. Run the Cypress spec
   t/cypress/integration/Admin/VuePagesLogin_spec.ts

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to