[Koha-bugs] [Bug 24018] New: No need to die "Not logged in"

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 12 16:03:27 CET 2019


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 at bugs.koha-community.org
          Reporter: jonathan.druart at bugs.koha-community.org
        QA Contact: testopia at 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.


More information about the Koha-bugs mailing list