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

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 30 Jun 2006 18:06:47 -0000


raeburn		Fri Jun 30 14:06:47 2006 EDT

  Modified files:              
    /loncom/interface	lonsimplepage.pm 
  Log:
  Users with privilege to create/modify/delete groups in a course can always edit group home page and can always see links to group functions. 
  
  
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.41 loncom/interface/lonsimplepage.pm:1.42
--- loncom/interface/lonsimplepage.pm:1.41	Thu May 18 13:12:58 2006
+++ loncom/interface/lonsimplepage.pm	Fri Jun 30 14:06:47 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Simple Page Editor
 #
-# $Id: lonsimplepage.pm,v 1.41 2006/05/18 17:12:58 albertel Exp $
+# $Id: lonsimplepage.pm,v 1.42 2006/06/30 18:06:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -129,8 +129,10 @@
     if ($caller eq 'grppg') {
         if (($grp_view_permission) || 
                            (&Apache::longroup::check_group_access($caller))) {
-            unless(&Apache::lonnet::allowed('vgh',
-                                      $env{'request.course.id'}.'/'.$marker)) {
+            if ((!&Apache::lonnet::allowed('vgh',
+                                      $env{'request.course.id'}.'/'.$marker))
+                && (!&Apache::lonnet::allowed('mdg',
+                                      $env{'request.course.id'}.'/'.$marker))) {
                 &display_group_links($r,$target,$marker,'view',%groupinfo);
                 return OK;
             }
@@ -149,8 +151,8 @@
 
     my $allowed;
     if ($caller eq 'grppg') {
-        $allowed  = $grp_view_permission;
-        unless ($allowed) {
+        $allowed  = &Apache::lonnet::allowed('mdg',$env{'request.course.id'});
+        if (!$allowed) {
             $allowed = &Apache::lonnet::allowed('mgh',$env{'request.course.id'}.
                                                                   '/'.$marker);
         }