Bug 27342

Summary: Improve readability and improvement of C4::Auth::get_template_and_user
Product: Koha Reporter: Jonathan Druart <jonathan.druart+koha>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart+koha>
Status: Pushed to master --- QA Contact: Martin Renvoize <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: dcook, m.de.rooy, martin.renvoize, tomascohen
Version: unspecifiedKeywords: release-notes-needed
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26845
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31389
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Bug Depends on:    
Bug Blocks: 27341    
Attachments: Bug 27342: Improve test for OPAC
Bug 27342: Remove dbh from C4::Auth
Bug 27342: Improve test for OPAC
Bug 27342: Remove dbh from C4::Auth
Bug 27342: Improve test for OPAC
Bug 27342: Remove dbh from C4::Auth
Bug 27342: (QA follow-up) Remove dbh from new tests
Bug 27342: (QA follow-up) Fix test
Bug 27342: Fix C4::ILSDI::Services::AuthenticatePatron

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>