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

www lon-capa-cvs@mail.lon-capa.org
Thu, 23 Jun 2005 23:51:32 -0000


www		Thu Jun 23 19:51:32 2005 EDT

  Modified files:              
    /loncom/interface	lonsource.pm 
  Log:
  Bug #3915: view source does not work across domains
  "cre" is one of those underutilized privileges. It really only exists on
  course and domain levels right now.
  
  
Index: loncom/interface/lonsource.pm
diff -u loncom/interface/lonsource.pm:1.13 loncom/interface/lonsource.pm:1.14
--- loncom/interface/lonsource.pm:1.13	Thu Jun 23 19:24:53 2005
+++ loncom/interface/lonsource.pm	Thu Jun 23 19:51:32 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Souce Code handler
 #
-# $Id: lonsource.pm,v 1.13 2005/06/23 23:24:53 www Exp $
+# $Id: lonsource.pm,v 1.14 2005/06/23 23:51:32 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -63,7 +63,7 @@
               <input type="hidden" name="filename" value="'.$filename.'" />
               <input type="hidden" name="listname" value="'.$listname.'" />
               <input type="hidden" name="action" value="copy_stage" />
-              <input type="text" name="newpath" value="/shared_source/'.$author.'" />&nbsp;
+              <input type="text" size="50" name="newpath" value="/shared_source/'.$author.'" />&nbsp;
               <input type="submit" value="Copy" />
               </form>');
     return OK;
@@ -214,8 +214,7 @@
         $env{'user.error.msg'}="$filename:cre:1:1:Source code not available";
         return HTTP_NOT_ACCEPTABLE;
     } 
-    if ((!&Apache::lonnet::allowed('cre',$filename)) ||
-            (!&Apache::lonnet::allowed('bre',$filename))) {
+    unless (&Apache::lonnet::allowed('bre',$filename)) {
         $env{'user.error.msg'}="$filename:bre:1:1:Access to resource denied";
         return HTTP_NOT_ACCEPTABLE;
     }