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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 14 Dec 2004 20:32:15 -0000


albertel		Tue Dec 14 15:32:15 2004 EDT

  Modified files:              
    /loncom/auth	lonacc.pm 
  Log:
  - allow smpedit to take a symb arg
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.52 loncom/auth/lonacc.pm:1.53
--- loncom/auth/lonacc.pm:1.52	Thu Nov 11 17:18:23 2004
+++ loncom/auth/lonacc.pm	Tue Dec 14 15:32:15 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.52 2004/11/11 22:18:23 raeburn Exp $
+# $Id: lonacc.pm,v 1.53 2004/12/14 20:32:15 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -109,6 +109,7 @@
             if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') ||
  ($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$)/) ||
  ($requrl=~/^\/adm\/wrapper\//) ||
+ ($requrl=~m|\.problem/smpedit$|) ||
  ($requrl=~/^\/public\/.*\/syllabus$/)) {
 # ------------------------------------- This is serious stuff, get symb and log
 		my $query=$r->args;
@@ -116,13 +117,16 @@
                 if ($query) {
 		    &Apache::loncommon::get_unprocessed_cgi($query,['symb']);
                 }
+		&Apache::lonnet::logthis("form.symb is ".$ENV{'form.symb'});
                 if ($ENV{'form.symb'}) {
 		    $symb=&Apache::lonnet::symbclean($ENV{'form.symb'});
                     if ($requrl =~ m|^/adm/wrapper/|) {
                         my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb);
                         &Apache::lonnet::symblist($map,$murl => $mid,
                                                'last_known' => $murl);
-                    } elsif (&Apache::lonnet::symbverify($symb,$requrl)) {
+                    } elsif ((&Apache::lonnet::symbverify($symb,$requrl)) ||
+			     (($requrl=~m|(.*)/smpedit$|) &&
+			      &Apache::lonnet::symbverify($symb,$1))) {
                       my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb);
                       &Apache::lonnet::symblist($map,$murl => $mid,
                                                'last_known' => $murl);