[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm
raeburn
raeburn at source.lon-capa.org
Fri Dec 29 22:45:44 EST 2023
raeburn Sat Dec 30 03:45:44 2023 EDT
Modified files:
/loncom/interface lonsearchcat.pm
Log:
- Avoid need for access control check for each record.
Only add to results if access is public or passphrase-protected (guest).
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.358 loncom/interface/lonsearchcat.pm:1.359
--- loncom/interface/lonsearchcat.pm:1.358 Fri Dec 22 20:11:55 2023
+++ loncom/interface/lonsearchcat.pm Sat Dec 30 03:45:44 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.358 2023/12/22 20:11:55 raeburn Exp $
+# $Id: lonsearchcat.pm,v 1.359 2023/12/30 03:45:44 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2564,8 +2564,8 @@
if ($area eq 'portfolio') {
next if (defined($matches{$Fields{'url'}}));
- # Skip if inaccessible
- next if (!&Apache::lonnet::portfolio_access($Fields{'url'}));
+ # Skip unless access control set to public or passphrase-protected
+ next unless (($Fields{'scope'} eq 'public') || ($Fields{'scope'} eq 'guest'));
$matches{$Fields{'url'}} = 1;
}
#
More information about the LON-CAPA-cvs
mailing list