[LON-CAPA-cvs] cvs: loncom /cgi clusterstatus.pl loncron.pl lonversions.pl metadata_harvest.pl metadata_keywords.pl ping.pl takeoffline.pl takeonline.pl userstatus.pl

raeburn raeburn@source.lon-capa.org
Thu, 25 Dec 2008 01:56:04 -0000


This is a MIME encoded message

--raeburn1230170164
Content-Type: text/plain

raeburn		Thu Dec 25 01:56:04 2008 EDT

  Modified files:              
    /loncom/cgi	clusterstatus.pl loncron.pl lonversions.pl 
               	metadata_harvest.pl metadata_keywords.pl ping.pl 
               	takeoffline.pl takeonline.pl userstatus.pl 
  Log:
  - Changes resulting from movement of subroutines from loncgi.pm
    to lonauthcgi.pm.
  
  
--raeburn1230170164
Content-Type: text/plain
Content-Disposition: attachment; filename="raeburn-20081225015604.txt"

Index: loncom/cgi/clusterstatus.pl
diff -u loncom/cgi/clusterstatus.pl:1.25 loncom/cgi/clusterstatus.pl:1.26
--- loncom/cgi/clusterstatus.pl:1.25	Sat Nov 29 00:57:09 2008
+++ loncom/cgi/clusterstatus.pl	Thu Dec 25 01:56:03 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 $|=1;
 # Generates a html page showing various status reports about the domain or cluster
-# $Id: clusterstatus.pl,v 1.25 2008/11/29 00:57:09 raeburn Exp $
+# $Id: clusterstatus.pl,v 1.26 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -33,6 +33,7 @@
 use Apache::lonlocal;
 use LONCAPA::Configuration;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 use LWP::UserAgent();
 use HTTP::Headers;
 use IO::File;
@@ -726,9 +727,9 @@
     exit;
 }
 
-if (!&LONCAPA::loncgi::can_view('clusterstatus')) {
+if (!&LONCAPA::lonauthcgi::can_view('clusterstatus')) {
     &Apache::lonlocal::get_language_handle();
-    print &LONCAPA::loncgi::unauthorized_msg('clusterstatus');
+    print &LONCAPA::lonauthcgi::unauthorized_msg('clusterstatus');
     exit;
 }
 
Index: loncom/cgi/loncron.pl
diff -u loncom/cgi/loncron.pl:1.6 loncom/cgi/loncron.pl:1.7
--- loncom/cgi/loncron.pl:1.6	Fri Nov 28 20:50:25 2008
+++ loncom/cgi/loncron.pl	Thu Dec 25 01:56:03 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 $|=1;
 # Runs loncron
-# $Id: loncron.pl,v 1.6 2008/11/28 20:50:25 raeburn Exp $
+# $Id: loncron.pl,v 1.7 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -32,22 +32,23 @@
 use Apache::lonlocal;
 use LONCAPA::Configuration;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 
 print("Content-type: text/html\n\n");
 
 &main();
 
 sub main {
-    if (!&LONCAPA::loncgi::check_ipbased_access('loncron')) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access('loncron')) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             &Apache::lonlocal::get_language_handle();
             print(&LONCAPA::loncgi::missing_cookie_msg());
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('loncron')) {
+        if (!&LONCAPA::lonauthcgi::can_view('loncron')) {
             &Apache::lonlocal::get_language_handle();
-            print(&LONCAPA::loncgi::unauthorized_msg('loncron'));
+            print(&LONCAPA::lonauthcgi::unauthorized_msg('loncron'));
             return;
         }
     }
Index: loncom/cgi/lonversions.pl
diff -u loncom/cgi/lonversions.pl:1.5 loncom/cgi/lonversions.pl:1.6
--- loncom/cgi/lonversions.pl:1.5	Fri Nov 28 20:50:25 2008
+++ loncom/cgi/lonversions.pl	Thu Dec 25 01:56:03 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 $|=1;
 # Prints ut the Id line from most files
-# $Id: lonversions.pl,v 1.5 2008/11/28 20:50:25 raeburn Exp $
+# $Id: lonversions.pl,v 1.6 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -32,22 +32,23 @@
 use Apache::lonlocal;
 use LONCAPA::Configuration;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 
 print("Content-type: text/html\n\n");
 
 &main();
 
 sub main {
-    if (!&LONCAPA::loncgi::check_ipbased_access('codeversions')) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access('codeversions')) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             &Apache::lonlocal::get_language_handle();
             print(&LONCAPA::loncgi::missing_cookie_msg());
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('codeversions')) {
+        if (!&LONCAPA::lonauthcgi::can_view('codeversions')) {
             &Apache::lonlocal::get_language_handle();
-            print(&LONCAPA::loncgi::unauthorized_msg('codeversions'));
+            print(&LONCAPA::lonauthcgi::unauthorized_msg('codeversions'));
             return;
         }
     }
Index: loncom/cgi/metadata_harvest.pl
diff -u loncom/cgi/metadata_harvest.pl:1.4 loncom/cgi/metadata_harvest.pl:1.5
--- loncom/cgi/metadata_harvest.pl:1.4	Fri Nov 28 20:50:25 2008
+++ loncom/cgi/metadata_harvest.pl	Thu Dec 25 01:56:03 2008
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # Inserts metadata from .meta files into the mysql database
-# $Id: metadata_harvest.pl,v 1.4 2008/11/28 20:50:25 raeburn Exp $
+# $Id: metadata_harvest.pl,v 1.5 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -68,6 +68,7 @@
 use Apache::lonlocal;
 use LONCAPA::Configuration;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 
 # ---------------------------- Print MIME Content-type and other initialization
 print 'Content-type: text/plain'."\n\n";
@@ -75,16 +76,16 @@
 &main();
 
 sub main {
-    if (!&LONCAPA::loncgi::check_ipbased_access('metadata_harvest')) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access('metadata_harvest')) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             &Apache::lonlocal::get_language_handle();
             print(&LONCAPA::loncgi::missing_cookie_msg());
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('metadata_harvest')) {
+        if (!&LONCAPA::lonauthcgi::can_view('metadata_harvest')) {
             &Apache::lonlocal::get_language_handle();
-            print(&LONCAPA::loncgi::unauthorized_msg('metadata_harvest'));
+            print(&LONCAPA::lonauthcgi::unauthorized_msg('metadata_harvest'));
             return;
         }
     }
Index: loncom/cgi/metadata_keywords.pl
diff -u loncom/cgi/metadata_keywords.pl:1.7 loncom/cgi/metadata_keywords.pl:1.8
--- loncom/cgi/metadata_keywords.pl:1.7	Fri Nov 28 20:50:25 2008
+++ loncom/cgi/metadata_keywords.pl	Thu Dec 25 01:56:03 2008
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # Gets keywords from metadata database.
-# $Id: metadata_keywords.pl,v 1.7 2008/11/28 20:50:25 raeburn Exp $
+# $Id: metadata_keywords.pl,v 1.8 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -69,6 +69,7 @@
 use Apache::lonlocal;
 use LONCAPA::Configuration;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 
 # ---------------------------- Print MIME Content-type and other initialization
 print 'Content-type: text/plain'."\n\n";
@@ -76,16 +77,16 @@
 &main();
 
 sub main {
-    if (!&LONCAPA::loncgi::check_ipbased_access('metadatakeywords')) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access('metadatakeywords')) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             &Apache::lonlocal::get_language_handle();
             print(&LONCAPA::loncgi::missing_cookie_msg());
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('metadata_keywords')) {
+        if (!&LONCAPA::lonauthcgi::can_view('metadata_keywords')) {
             &Apache::lonlocal::get_language_handle();
-            print(&LONCAPA::loncgi::unauthorized_msg('metadata_keywords'));
+            print(&LONCAPA::lonauthcgi::unauthorized_msg('metadata_keywords'));
             return;
         }
     }
Index: loncom/cgi/ping.pl
diff -u loncom/cgi/ping.pl:1.7 loncom/cgi/ping.pl:1.8
--- loncom/cgi/ping.pl:1.7	Fri Nov 28 20:50:25 2008
+++ loncom/cgi/ping.pl	Thu Dec 25 01:56:03 2008
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 # ping cgi-script
-# $Id: ping.pl,v 1.7 2008/11/28 20:50:25 raeburn Exp $
+# $Id: ping.pl,v 1.8 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,18 +31,19 @@
 use lib '/home/httpd/lib/perl/';
 use Apache::lonnet;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 
 print("Content-type: text/plain\n\n");
 
 &main();
 
 sub main {
-    if (!&LONCAPA::loncgi::check_ipbased_access('ping')) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access('ping')) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('ping')) {
+        if (!&LONCAPA::lonauthcgi::can_view('ping')) {
             return;
         }
     }
Index: loncom/cgi/takeoffline.pl
diff -u loncom/cgi/takeoffline.pl:1.3 loncom/cgi/takeoffline.pl:1.4
--- loncom/cgi/takeoffline.pl:1.3	Fri Nov 28 20:50:25 2008
+++ loncom/cgi/takeoffline.pl	Thu Dec 25 01:56:03 2008
@@ -2,7 +2,7 @@
 $|=1;
 # Take machine offline, reroute traffic
 #
-# $Id: takeoffline.pl,v 1.3 2008/11/28 20:50:25 raeburn Exp $
+# $Id: takeoffline.pl,v 1.4 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,22 +31,23 @@
 use lib '/home/httpd/lib/perl/';
 use Apache::lonlocal;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 
 print "Content-type: text/html\n\n";
 
 &main();
 
 sub main {
-    if (!&LONCAPA::loncgi::check_ipbased_access('takeoffline')) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access('takeoffline')) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             &Apache::lonlocal::get_language_handle();
             print(&LONCAPA::loncgi::missing_cookie_msg());
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('takeoffline')) {
+        if (!&LONCAPA::lonauthcgi::can_view('takeoffline')) {
             &Apache::lonlocal::get_language_handle();
-            print(&LONCAPA::loncgi::unauthorized_msg('takeoffline'));
+            print(&LONCAPA::lonauthcgi::unauthorized_msg('takeoffline'));
             return;
         }
     }
Index: loncom/cgi/takeonline.pl
diff -u loncom/cgi/takeonline.pl:1.3 loncom/cgi/takeonline.pl:1.4
--- loncom/cgi/takeonline.pl:1.3	Fri Nov 28 20:50:25 2008
+++ loncom/cgi/takeonline.pl	Thu Dec 25 01:56:03 2008
@@ -2,7 +2,7 @@
 $|=1;
 # Take machine online
 #
-# $Id: takeonline.pl,v 1.3 2008/11/28 20:50:25 raeburn Exp $
+# $Id: takeonline.pl,v 1.4 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -31,22 +31,23 @@
 use lib '/home/httpd/lib/perl/';
 use Apache::lonlocal;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 
 print "Content-type: text/html\n\n";
 
 &main();
 
 sub main {
-    if (!&LONCAPA::loncgi::check_ipbased_access('takeonline')) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access('takeonline')) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             &Apache::lonlocal::get_language_handle();
             print &LONCAPA::loncgi::missing_cookie_msg();
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('takeonline')) {
+        if (!&LONCAPA::lonauthcgi::can_view('takeonline')) {
             &Apache::lonlocal::get_language_handle();
-            print &LONCAPA::loncgi::unauthorized_msg('takeonline');
+            print &LONCAPA::lonauthcgi::unauthorized_msg('takeonline');
             return;
         }
     }
Index: loncom/cgi/userstatus.pl
diff -u loncom/cgi/userstatus.pl:1.17 loncom/cgi/userstatus.pl:1.18
--- loncom/cgi/userstatus.pl:1.17	Fri Nov 28 20:45:21 2008
+++ loncom/cgi/userstatus.pl	Thu Dec 25 01:56:03 2008
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 $|=1;
 # User Status
-# $Id: userstatus.pl,v 1.17 2008/11/28 20:45:21 raeburn Exp $
+# $Id: userstatus.pl,v 1.18 2008/12/25 01:56:03 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -32,6 +32,7 @@
 use Apache::lonlocal;
 use LONCAPA::Configuration;
 use LONCAPA::loncgi;
+use LONCAPA::lonauthcgi;
 use HTTP::Headers;
 use GDBM_File;
 
@@ -72,16 +73,16 @@
     delete $$perlvar{'lonReceipt'}; # remove since sensitive and not needed
     delete $$perlvar{'lonSqlAccess'}; # remove since sensitive and not needed
 
-    if (!&LONCAPA::loncgi::check_ipbased_access()) {
+    if (!&LONCAPA::lonauthcgi::check_ipbased_access()) {
         if (!&LONCAPA::loncgi::check_cookie_and_load_env()) {
             &Apache::lonlocal::get_language_handle();
             print &LONCAPA::loncgi::missing_cookie_msg();
             return;
         }
 
-        if (!&LONCAPA::loncgi::can_view('userstatus')) {
+        if (!&LONCAPA::lonauthcgi::can_view('userstatus')) {
             &Apache::lonlocal::get_language_handle();
-            print &LONCAPA::loncgi::unauthorized_msg('userstatus');
+            print &LONCAPA::lonauthcgi::unauthorized_msg('userstatus');
             return;
         }
     }

--raeburn1230170164--