[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /auth lonacc.pm

raeburn raeburn@source.lon-capa.org
Fri, 19 Mar 2010 22:22:34 -0000


raeburn		Fri Mar 19 22:22:34 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/auth	lonacc.pm 
  Log:
  - Backport 1.132.
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.130 loncom/auth/lonacc.pm:1.130.4.1
--- loncom/auth/lonacc.pm:1.130	Tue Nov  3 03:06:07 2009
+++ loncom/auth/lonacc.pm	Fri Mar 19 22:22:34 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.130 2009/11/03 03:06:07 raeburn Exp $
+# $Id: lonacc.pm,v 1.130.4.1 2010/03/19 22:22:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -452,8 +452,16 @@
                 if ($requrl =~ m{^/res/}) {
                     $access = &Apache::lonnet::allowed('bro',$requrl);
                     if ($access ne 'F') {
-                        $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied";
-                        return HTTP_NOT_ACCEPTABLE;
+                        if ($requrl eq '/res/lib/templates/simpleproblem.problem/smpedit') {
+                            $access = &Apache::lonnet::allowed('bre','/res/lib/templates/simpleproblem.problem');
+                            if ($access ne 'F') {
+                                $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied";
+                                return HTTP_NOT_ACCEPTABLE;
+                            }
+                        } else {
+                            $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied";
+                            return HTTP_NOT_ACCEPTABLE;
+                        }
                     }
                 } else {
 		    $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied";