[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-cvs
Subject:    [LON-CAPA-cvs] cvs: loncom /interface lonsearchcat.pm
From:       musolffc <musolffc () source ! lon-capa ! org>
Date:       2016-04-22 17:22:29
Message-ID: cvsmusolffc1461345749 () cvsserver
[Download RAW message or body]

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') &&


_______________________________________________
LON-CAPA-cvs mailing list
LON-CAPA-cvs@mail.lon-capa.org
http://mail.lon-capa.org/mailman/listinfo/lon-capa-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic