Bug 27342 - Improve readability and improvement of C4::Auth::get_template_and_user
Summary: Improve readability and improvement of C4::Auth::get_template_and_user
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Martin Renvoize
URL:
Keywords: release-notes-needed
Depends on:
Blocks: 27341
  Show dependency treegraph
 
Reported: 2021-01-05 13:49 UTC by Jonathan Druart
Modified: 2024-01-29 22:05 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.18


Attachments
Bug 27342: Improve test for OPAC (837 bytes, patch)
2021-01-05 14:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27342: Remove dbh from C4::Auth (26.42 KB, patch)
2021-01-05 14:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27342: Improve test for OPAC (839 bytes, patch)
2022-03-22 14:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27342: Remove dbh from C4::Auth (25.55 KB, patch)
2022-03-22 14:17 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27342: Improve test for OPAC (903 bytes, patch)
2022-08-10 07:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27342: Remove dbh from C4::Auth (25.61 KB, patch)
2022-08-10 07:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27342: (QA follow-up) Remove dbh from new tests (1.16 KB, patch)
2022-08-10 07:15 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27342: (QA follow-up) Fix test (899 bytes, patch)
2022-08-16 13:52 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27342: Fix C4::ILSDI::Services::AuthenticatePatron (968 bytes, patch)
2022-08-17 13:33 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-01-05 13:49:34 UTC

    
Comment 1 Jonathan Druart 2021-01-05 14:16:28 UTC
Created attachment 114874 [details] [review]
Bug 27342: Improve test for OPAC

We don't need to build allowed_scripts_for_private_opac for staff
Comment 2 Jonathan Druart 2021-01-05 14:16:31 UTC
Created attachment 114875 [details] [review]
Bug 27342: Remove dbh from C4::Auth

We must not pass $dbh but retrieve it when needed instead
Comment 3 David Cook 2021-01-05 23:05:07 UTC
This looks like it will be tough to test although I think it's worth doing.
Comment 4 Martin Renvoize 2021-02-23 14:07:28 UTC
Nice little cleanup here.. clear to read and review..  are you continuing here Jonathan or is this a first bug where you intend to continue on other bugs?
Comment 5 Jonathan Druart 2022-03-22 14:17:28 UTC
Created attachment 132024 [details] [review]
Bug 27342: Improve test for OPAC

We don't need to build allowed_scripts_for_private_opac for staff
Comment 6 Jonathan Druart 2022-03-22 14:17:32 UTC
Created attachment 132025 [details] [review]
Bug 27342: Remove dbh from C4::Auth

We must not pass $dbh but retrieve it when needed instead
Comment 7 Jonathan Druart 2022-03-22 14:17:44 UTC
There is not much here but I think it can go anyway.
Comment 8 Martin Renvoize 2022-08-10 07:15:00 UTC
Created attachment 138948 [details] [review]
Bug 27342: Improve test for OPAC

We don't need to build allowed_scripts_for_private_opac for staff

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Martin Renvoize 2022-08-10 07:15:04 UTC
Created attachment 138949 [details] [review]
Bug 27342: Remove dbh from C4::Auth

We must not pass $dbh but retrieve it when needed instead

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2022-08-10 07:15:08 UTC
Created attachment 138950 [details] [review]
Bug 27342: (QA follow-up) Remove dbh from new tests
Comment 11 Martin Renvoize 2022-08-10 07:15:53 UTC
Nice bit of refactoring and all works as expected, no regressions.

QA scripts happy and tests passing.

Going for a straight QA on this simple pair of patches.

Passing.
Comment 12 Tomás Cohen Arazi 2022-08-16 13:52:24 UTC
Created attachment 139196 [details] [review]
Bug 27342: (QA follow-up) Fix test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Tomás Cohen Arazi 2022-08-16 13:53:38 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 14 Tomás Cohen Arazi 2022-08-16 13:55:16 UTC
This trivial change needs to be cleary documented and advertised on the release notes in case people are using checkpw (e.g. in plugins).
Comment 15 Tomás Cohen Arazi 2022-08-17 13:33:55 UTC
Created attachment 139294 [details] [review]
Bug 27342: Fix C4::ILSDI::Services::AuthenticatePatron

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 16 Lucas Gass 2022-10-03 22:14:43 UTC
Enhancement will not be backported to 22.05.x unless requested
Comment 17 wainuiwitikapark 2024-01-24 21:03:19 UTC
Backported to 22.05 as needed for Bug 34893