--- loncom/interface/lonsearchcat.pm 2002/07/05 18:56:52 1.136 +++ loncom/interface/lonsearchcat.pm 2002/07/08 14:52:19 1.138 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.136 2002/07/05 18:56:52 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.138 2002/07/08 14:52:19 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1247,6 +1247,21 @@ CATALOGCONTROLS chomp $result; next unless $result; %Fields = &parse_raw_result($result,$rkey); + # + # Check copyright tags and skip results the user cannot use + my (undef,undef,$resdom,$resname) = split('/',$Fields{'url'}); + # Check for priv + if (($Fields{'copyright'} eq 'priv') && + (($ENV{'user.name'} ne $resname) && + ($ENV{'user.domain'} ne $resdom))) { + next; + } + # Check for domain + if (($Fields{'copyright'} eq 'domain') && + ($ENV{'user.domain'} ne $resdom)) { + next; + } + # $Fields{'extrashow'}=$extrashow; if ($extrashow) { foreach my $field (@customfields) {