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

raeburn lon-capa-cvs@mail.lon-capa.org
Mon, 17 Jul 2006 16:10:58 -0000


raeburn		Mon Jul 17 12:10:58 2006 EDT

  Modified files:              
    /loncom/interface	lonchat.pm lonchatfetch.pm 
  Log:
  Group privs allow access if role includes section specification.
  
  
Index: loncom/interface/lonchat.pm
diff -u loncom/interface/lonchat.pm:1.14 loncom/interface/lonchat.pm:1.15
--- loncom/interface/lonchat.pm:1.14	Wed Jun 28 19:56:09 2006
+++ loncom/interface/lonchat.pm	Mon Jul 17 12:10:57 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Chat
 #
-# $Id: lonchat.pm,v 1.14 2006/06/28 23:56:09 raeburn Exp $
+# $Id: lonchat.pm,v 1.15 2006/07/17 16:10:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -46,7 +46,7 @@
         $group_elem = '<input type="hidden" name="group" value="'.$group.'" />'; 
         if ((! &Apache::lonnet::allowed('pgc',$env{'request.course.id'}.'/'.
                                                                     $group))
-            && (! &Apache::lonnet::allowed('vcg',$env{'request.course.id'}))) {
+            && (! &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) {
             return HTTP_NOT_ACCEPTABLE;
         }
     } else {
Index: loncom/interface/lonchatfetch.pm
diff -u loncom/interface/lonchatfetch.pm:1.30 loncom/interface/lonchatfetch.pm:1.31
--- loncom/interface/lonchatfetch.pm:1.30	Sun Jul  2 20:44:45 2006
+++ loncom/interface/lonchatfetch.pm	Mon Jul 17 12:10:57 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Chat Fetching
 #
-# $Id: lonchatfetch.pm,v 1.30 2006/07/03 00:44:45 albertel Exp $
+# $Id: lonchatfetch.pm,v 1.31 2006/07/17 16:10:57 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -50,8 +50,8 @@
         $group = $env{'form.group'};
         if ((! &Apache::lonnet::allowed('pgc',$env{'request.course.id'}.'/'.
 				       $group)) &&
-           (! &Apache::lonnet::allowed('vcg',$env{'request.course.id'}))) {
-	    
+           (! &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.
+         ($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) {
             return HTTP_NOT_ACCEPTABLE;
         }
         my %curr_groups = &Apache::longroup::coursegroups($cdom,$cnum,$group);