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

www lon-capa-cvs-allow@mail.lon-capa.org
Wed, 28 May 2008 22:22:37 -0000


www		Wed May 28 18:22:37 2008 EDT

  Modified files:              
    /loncom/interface	lonsearchcat.pm 
    /loncom/publisher	lonpublisher.pm 
  Log:
  Bug #4106: really evaluate custom rights
  
  
Index: loncom/interface/lonsearchcat.pm
diff -u loncom/interface/lonsearchcat.pm:1.294 loncom/interface/lonsearchcat.pm:1.295
--- loncom/interface/lonsearchcat.pm:1.294	Wed May 28 17:23:17 2008
+++ loncom/interface/lonsearchcat.pm	Wed May 28 18:22:27 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Search Catalog
 #
-# $Id: lonsearchcat.pm,v 1.294 2008/05/28 21:23:17 www Exp $
+# $Id: lonsearchcat.pm,v 1.295 2008/05/28 22:22:27 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2118,7 +2118,7 @@
     }
     # Check for custom rights
     if ($Metadata->{'copyright'} eq 'custom') {
-       return 0;
+       return &Apache::lonnet::customacccess('bre',$Metadata->{'url'});
     }
     return 1;
 }
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.236 loncom/publisher/lonpublisher.pm:1.237
--- loncom/publisher/lonpublisher.pm:1.236	Mon May 19 14:43:16 2008
+++ loncom/publisher/lonpublisher.pm	Wed May 28 18:22:35 2008
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.236 2008/05/19 18:43:16 www Exp $
+# $Id: lonpublisher.pm,v 1.237 2008/05/28 22:22:35 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -850,8 +850,7 @@
         return ($error,undef);
     }
     my $dbh = &Apache::lonmysql::get_dbh();
-    if (($metadata{'obsolete'}) || ($metadata{'copyright'} eq 'priv') ||
-	($metadata{'copyright'} eq 'custom')) {
+    if (($metadata{'obsolete'}) || ($metadata{'copyright'} eq 'priv')) {
         # remove this entry
 	my $delitem = 'url = '.$dbh->quote($metadata{'url'});
 	$status = &LONCAPA::lonmetadata::delete_metadata($dbh,undef,$delitem);