View | Details | Raw Unified | Return to bug 41894
Collapse All | Expand All

(-)a/Koha/Libraries.pm (-1 / +1 lines)
Lines 54-60 sub search_filtered { Link Here
54
            my @branchcodes    = $logged_in_user->libraries_where_can_see_patrons;
54
            my @branchcodes    = $logged_in_user->libraries_where_can_see_patrons;
55
            $params->{branchcode} = { -in => \@branchcodes } if @branchcodes;
55
            $params->{branchcode} = { -in => \@branchcodes } if @branchcodes;
56
        } else {
56
        } else {
57
            if (C4::Context::only_my_library) {
57
            if ( C4::Context->only_my_library ) {
58
                $params->{branchcode} = C4::Context->userenv->{branch};
58
                $params->{branchcode} = C4::Context->userenv->{branch};
59
            }
59
            }
60
        }
60
        }
(-)a/Koha/Patron.pm (-2 / +1 lines)
Lines 2351-2357 sub libraries_where_can_see_things { Link Here
2351
    return () unless $userenv;    # For tests, but userenv should be defined in tests...
2351
    return () unless $userenv;    # For tests, but userenv should be defined in tests...
2352
2352
2353
    my @restricted_branchcodes;
2353
    my @restricted_branchcodes;
2354
    if (C4::Context::only_my_library) {
2354
    if ( C4::Context->only_my_library ) {
2355
        push @restricted_branchcodes, $self->branchcode;
2355
        push @restricted_branchcodes, $self->branchcode;
2356
    } else {
2356
    } else {
2357
        unless ( $self->has_permission( { $permission => $subpermission } ) ) {
2357
        unless ( $self->has_permission( { $permission => $subpermission } ) ) {
2358
- 

Return to bug 41894