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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 29 Aug 2006 20:34:39 -0000


albertel		Tue Aug 29 16:34:39 2006 EDT

  Modified files:              
    /loncom/auth	lonlogout.pm 
  Log:
  - logout when ssoed in 
       - login again against /adm/roles
       - allow for configurable text to be added (ostesibly for a logout of SSO link)
  
  
Index: loncom/auth/lonlogout.pm
diff -u loncom/auth/lonlogout.pm:1.19 loncom/auth/lonlogout.pm:1.20
--- loncom/auth/lonlogout.pm:1.19	Mon May  1 17:04:31 2006
+++ loncom/auth/lonlogout.pm	Tue Aug 29 16:34:39 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Logout Handler
 #
-# $Id: lonlogout.pm,v 1.19 2006/05/01 21:04:31 albertel Exp $
+# $Id: lonlogout.pm,v 1.20 2006/08/29 20:34:39 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -102,11 +102,21 @@
 					   'li' => 'log in again',
 					   'pe' => 'Please either',
 					   'or' => 'or');
+	my $login_url = '/adm/'.($env{'request.sso.login'} ? 'roles' 
+                                                           : 'login');
+	
 	$relogmessage=(<<ENDRELOG);
 	<h1>$lt{'gb'}!</h1>
 	    $lt{'pe'} <a href="javascript:self.close();">$lt{'cw'}</a> $lt{'or'}
-	<a href="/adm/login?domain=$sessionhash{'user.domain'}">$lt{'li'}</a>.
+	<a href="$login_url?domain=$sessionhash{'user.domain'}">$lt{'li'}</a>.
 ENDRELOG
+
+        if ($env{'request.sso.login'}
+	    && defined($r->dir_config('lonSSOUserLogoutMessageFile'))) {
+	    open(my $fh,$r->dir_config('lonSSOUserLogoutMessageFile'));
+	    $relogmessage.= join('',<$fh>);
+	}
+
     }
     my $end_page=&Apache::loncommon::end_page();
 # --------------------------------------------------------------- Screen Output