[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-239-g2ba267b

Thomas Sibley trs at bestpractical.com
Fri Jan 7 11:41:41 EST 2011


The branch, 3.8-trunk has been updated
       via  2ba267bd4f9dbca142e5fd4f20eb4e0a706ed3f9 (commit)
      from  eed01cfa281e4f1afc413949ec74da916cf7b7e6 (commit)

Summary of changes:
 share/html/Elements/Logout    |    7 ++-----
 share/html/NoAuth/Logout.html |    7 ++++++-
 2 files changed, 8 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 2ba267bd4f9dbca142e5fd4f20eb4e0a706ed3f9
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Jan 7 11:26:40 2011 -0500

    Rearrange callbacks to provide a means for sending the user to a URL on Logout
    
    ce8a0fc98d2a69246fb7cf30e1763afe9d1cdace removed the URL parameter to
    /NoAuth/Logout.html that Elements/Logout's callback relied upon.  Moving
    the callback to /NoAuth/Logout.html means that there's an easy place to
    override the URL redirected to.  Users don't lose session deletion
    like they do when they naively override Elements/Logout instead.
    
    See also #16403.

diff --git a/share/html/Elements/Logout b/share/html/Elements/Logout
index 4af02fd..2294ba1 100644
--- a/share/html/Elements/Logout
+++ b/share/html/Elements/Logout
@@ -45,10 +45,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
- | <a href="<% RT->Config->Get('WebPath') %>/NoAuth/Logout.html<% $URL ? "?URL=". $URL : '' %>"><&|/l&>Logout</&></a>
-<%ARGS>
-$URL => undef
-</%ARGS>
+ | <a href="<% RT->Config->Get('WebPath') %>/NoAuth/Logout.html"><&|/l&>Logout</&></a>
 <%INIT>
 my $show = 0;
 if ( $session{'CurrentUser'}->Name
@@ -59,7 +56,7 @@ if ( $session{'CurrentUser'}->Name
     $show = 1;
 }
 
-$m->callback( %ARGS, URL => \$URL, show => \$show );
+$m->callback( %ARGS, show => \$show );
 
 return unless $show;
 </%INIT>
diff --git a/share/html/NoAuth/Logout.html b/share/html/NoAuth/Logout.html
index b894fd4..5b1d244 100755
--- a/share/html/NoAuth/Logout.html
+++ b/share/html/NoAuth/Logout.html
@@ -56,7 +56,7 @@
 
 <br />
 <br />
-<a href="<%$URL%>"><&|/l&>You're welcome to login again</&></a>.
+<a href="<% RT->Config->Get('WebPath') %>/"><&|/l&>You're welcome to login again</&></a>.
 </&>
 
 % $m->callback( %ARGS );
@@ -68,6 +68,11 @@
 
 <%INIT>
 my $URL = RT->Config->Get('WebPath')."/";
+
+# Allow a callback to modify the URL we redirect to, which is useful for
+# external webauth systems
+$m->callback( %ARGS, URL => \$URL );
+
 $m->callback( %ARGS, CallbackName => 'BeforeSessionDelete' );
 
 if (keys %session) {

-----------------------------------------------------------------------


More information about the Rt-commit mailing list