From: Bill Erickson Date: Wed, 26 Oct 2011 18:56:01 +0000 (-0400) Subject: Z39.50 service filter repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9ea87436847f7335d154bd3ab9a05505ec5812bf;p=contrib%2FConifer.git Z39.50 service filter repairs Do not attempt to filter out Z39.50 services by permission when retrieveing the services in a non-authenticate manner (i.e. from within the Z39.50 code). Otherwise, the code will die on $e->requestor->id, because there is no requestor. Signed-off-by: Bill Erickson Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm index 6a095290e1..978b106e4c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm @@ -157,16 +157,18 @@ sub fetch_service_defs { }; # then filter out any services which the requestor lacks the perm for - foreach my $s (keys %{ $hash }) { - if ($$hash{$s}{use_perm}) { - if ($U->check_perms( - $e->requestor->id, - $e->requestor->ws_ou, - $$hash{$s}{use_perm} - )) { - delete $$hash{$s}; - } - }; + if ($editor_with_authtoken) { + foreach my $s (keys %{ $hash }) { + if ($$hash{$s}{use_perm}) { + if ($U->check_perms( + $e->requestor->id, + $e->requestor->ws_ou, + $$hash{$s}{use_perm} + )) { + delete $$hash{$s}; + } + }; + } } %services = %$hash; # cache these internally so we can actually use the db-configured sources