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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 24 01:39:03 CEST 2021


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

--- Comment #5 from David Cook <dcook at prosentient.com.au> ---
Comment on attachment 122341
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122341
Bug 26383: WIP Replace C4::Context->IsSuperLibrarian with
Koha::Patron->is_superlibrarian

Review of attachment 122341:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=26383&attachment=122341)
-----------------------------------------------------------------

::: C4/Circulation.pm
@@ +1073,5 @@
> +
> +    my $userenv = C4::Context->userenv;
> +    if ( C4::Context->preference("IndependentBranches") && $userenv ) {
> +        my $logged_in_user = Koha::Patrons->find($userenv->{number});
> +        unless ( $logged_in_user->is_superlibrarian ) {

I suppose a more optimal design would be to pass the issuer to CanBookBeIssued
via a parameter, but that would probably be too dramatic a refactor for us to
do at this point...

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list