Summary: | Fix styling issues on bad SCI/SCO module logins | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Authentication | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | dpavlin, jonathan.druart |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 12904, 15492 | ||
Bug Blocks: | |||
Attachments: |
Bug 20480: Make KOHA_VERSION available to all templates in all circumstances
Bug 20480: send KOHA_VERSION even if only one language is enabled Bug 20480: send KOHA_VERSION even if only one language is enabled Bug 20480: Make KOHA_VERSION available to all templates in all circumstances Bug 20480: send KOHA_VERSION even if only one language is enabled |
Description
Tomás Cohen Arazi (tcohen)
2018-03-27 14:44:09 UTC
Created attachment 73319 [details] [review] Bug 20480: Make KOHA_VERSION available to all templates in all circumstances This patch makes C4::Templates::gettemplate set the KOHA_VERSION param for the template. This way this template parameter, which is required by (probably) all pages that include CSS/JS content is available in all circumstances. A noticeable problem with the current approach is when using the SCO and SCI modules with wrong/forbidden users: C4::Auth short-circuits and redirects to the login page, without setting the KOHA_VERSION param. This patch solves it for good. To test: - Enable the SCI module - Open the browser at http://localhost:8080/cgi-bin/koha/sci/sci-main.pl - Login with the db user (koha_kohadev / password) => FAIL: Login failure, but styling is broken - Apply this patch - Retry => SUCCESS: Everything looks as it should! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 73330 [details] [review] Bug 20480: send KOHA_VERSION even if only one language is enabled Created attachment 73332 [details] [review] Bug 20480: send KOHA_VERSION even if only one language is enabled Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 73333 [details] [review] Bug 20480: Make KOHA_VERSION available to all templates in all circumstances This patch makes C4::Templates::gettemplate set the KOHA_VERSION param for the template. This way this template parameter, which is required by (probably) all pages that include CSS/JS content is available in all circumstances. A noticeable problem with the current approach is when using the SCO and SCI modules with wrong/forbidden users: C4::Auth short-circuits and redirects to the login page, without setting the KOHA_VERSION param. This patch solves it for good. To test: - Enable the SCI module - Open the browser at http://localhost:8080/cgi-bin/koha/sci/sci-main.pl - Login with the db user (koha_kohadev / password) => FAIL: Login failure, but styling is broken - Apply this patch - Retry => SUCCESS: Everything looks as it should! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 73334 [details] [review] Bug 20480: send KOHA_VERSION even if only one language is enabled Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 18.05 |