[Bug 24018] New: No need to die "Not logged in"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Bug ID: 24018 Summary: No need to die "Not logged in" Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 18403, 20489 There is a wrong pattern in several controller files: my $logged_in_user = Koha::Patrons->find( $loggedinuser ) or die "Not logged in"; This has been introduced by commit cee2cf9ff927504f9c24f6519462a7d702c5c27d Bug 18403: Add sub output_and_exit_if_error - unknown_patron & cannot_see_patron_infos Which noted: Note that the 'or die "Not logged in";' part should not be needed, but... who trusts C4::Auth? I think it could be used as a safeguard later. I am willing to sed and remove them if required. Since we prevent DB user login it's no longer needed. It is time to remove it, as we trust our code (don't you?) and it can be confusing. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18403 [Bug 18403] Hide patron information if not part of the logged in user library group https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20489 [Bug 20489] Prevent DB user login -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 95328 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95328&action=edit Bug 24018: Remove die "Not logged in" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |black23@gmail.com Status|Needs Signoff |Patch doesn't apply --- Comment #2 from Michal Denar <black23@gmail.com> --- Jonathan, can you rebasi this patch on master? Thank you. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95328|0 |1 is obsolete| | --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97160 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97160&action=edit Bug 24018: Remove die "Not logged in" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Michal Denar <black23@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97160|0 |1 is obsolete| | --- Comment #4 from Michal Denar <black23@gmail.com> --- Created attachment 97232 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97232&action=edit Bug 24018: Remove die "Not logged in" Signed-off-by: Michal Denar <black23@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97232|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 97476 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97476&action=edit Bug 24018: Remove die "Not logged in" Signed-off-by: Michal Denar <black23@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Note: I checked a number of edits to see which call was preceding the find or die statement. In the very most cases it is a get_template_and_user. In members/mod_debarment.pl it was a checkauth call. I saw it twice. This should be fine especially since a flagsrequired is passed too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |20.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24018 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com --- Comment #8 from Joy Nelson <joy@bywatersolutions.com> --- Does not apply to 19.11.x branch. Please rebase if needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org