[LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm

musolffc musolffc at source.lon-capa.org
Fri Apr 22 13:22:29 EDT 2016


musolffc		Fri Apr 22 17:22:29 2016 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
  Log:
  Limiting access to "private" resources
  
  Private resources will now only show up in search results for the author and only if they are logged into the server on which it was published.  
  
  The use of private resources was discontinued in 2008.  This only applies to older resources.
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.347 loncom/interface/lonsearchcat.pm:1.348
--- loncom/interface/lonsearchcat.pm:1.347	Thu Jun 18 15:10:52 2015
+++ loncom/interface/lonsearchcat.pm	Fri Apr 22 17:22:29 2016
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.347 2015/06/18 15:10:52 damieng Exp $
+# $Id: lonsearchcat.pm,v 1.348 2016/04/22 17:22:29 musolffc Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1912,10 +1912,11 @@
     my (undef,undef,$resdom,$resname) = split('/',
                                               $Metadata->{'url'});
     # Check for priv
-    if (($Metadata->{'copyright'} eq 'priv') && 
-        (($env{'user.name'} ne $resname) &&
-         ($env{'user.domain'} ne $resdom))) {
-        return 0;
+    if ($Metadata->{'copyright'} eq 'priv') {
+        unless (($env{'user.name'} eq $resname) &&
+                ($env{'user.domain'} eq $resdom)) {
+            return 0;
+        }
     }
     # Check for domain
     if (($Metadata->{'copyright'} eq 'domain') &&




More information about the LON-CAPA-cvs mailing list