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.
Created attachment 95328 [details] [review] Bug 24018: Remove die "Not logged in"
Jonathan, can you rebasi this patch on master? Thank you.
Created attachment 97160 [details] [review] Bug 24018: Remove die "Not logged in"
Created attachment 97232 [details] [review] Bug 24018: Remove die "Not logged in" Signed-off-by: Michal Denar <black23@gmail.com>
Created attachment 97476 [details] [review] 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>
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.
Nice work everyone! Pushed to master for 20.05
Does not apply to 19.11.x branch. Please rebase if needed.