[Koha-bugs] [Bug 26383] New: Koha::Patron->is_superlibrarian is not optimal

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 4 11:44:09 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26383

            Bug ID: 26383
           Summary: Koha::Patron->is_superlibrarian is not optimal
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: jonathan.druart at bugs.koha-community.org
        QA Contact: testopia at bugs.koha-community.org
        Depends on: 23634

It must not call $self->has_permission which does a DB request.
C4::Context::IsSuperLibrarian is what must be done: $self->flags % 2

It could be good to replace the occurrence of IsSuperLibrarian at the same
time, it's a bad pattern to have twice the same method to check for this
superpower.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23634
[Bug 23634] Privilege escalation vulnerability for staff users with
'edit_borrowers' permission and 'OpacResetPassword' enabled
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list