[Rt-commit] rt branch, master, updated. rt-4.6.0-pre1-2-g9917f0141

Jim Brandt jbrandt at bestpractical.com
Mon Feb 11 17:13:31 EST 2019


The branch, master has been updated
       via  9917f01412ee967540216dd0f157b228240e23dd (commit)
       via  db0be552248284989cb7aafd64e4f241afa32297 (commit)
      from  ef42d9fc337877643c6b69e847c23cdd5c0db3c4 (commit)

Summary of changes:
 etc/RT_Config.pm.in                 | 11 +++++++++++
 lib/RT/Interface/Web/MenuBuilder.pm |  6 ++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit db0be552248284989cb7aafd64e4f241afa32297
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date:   Fri Dec 28 23:23:45 2018 -0500

    Make RT logout link configurable
    
    When external authentication is used to log into RT, the RT logout
    link needs to be updated to direct to the identity provider's
    logout URL, rather than the default RT logout link. Config added to
    make it easier to update the logout URL.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index f6e7273f0..df2cba8a2 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2470,6 +2470,17 @@ chance of fallback to the login screen, even if REMOTE_USER failed.
 
 Set($WebFallbackToRTLogin, undef);
 
+=item C<$LogoutURL>
+
+By default, C<$LogoutURL> is set to RT's logout page. When an
+external service is used to log into RT, C<$LogoutURL> can be set
+to the identity provider's logout URL. Include the full path to the
+logout endpoint, for example: 'https://www.example.com/logout'.
+
+=cut
+
+Set($LogoutURL, '/NoAuth/Logout.html');
+
 =item C<$WebRemoteUserGecos>
 
 C<$WebRemoteUserGecos> means to match 'gecos' field as the user
diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index 283aeee9b..4d407d365 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -272,10 +272,11 @@ sub BuildMainNav {
 
         }
     }
+    my $logout_url = RT->Config->Get('LogoutURL');
     if ( $current_user->Name
          && (   !RT->Config->Get('WebRemoteUserAuth')
               || RT->Config->Get('WebFallbackToRTLogin') )) {
-        $about_me->child( logout => title => loc('Logout'), path => '/NoAuth/Logout.html' );
+        $about_me->child( logout => title => loc('Logout'), path => $logout_url );
     }
     if ( $request_path =~ m{^/Dashboards/(\d+)?}) {
         if ( my $id = ( $1 || $HTML::Mason::Commands::DECODED_ARGS->{'id'} ) ) {
@@ -1246,10 +1247,11 @@ sub BuildSelfServiceNav {
         $about_me->child( prefs => title => loc('Preferences'), path => '/SelfService/Prefs.html' );
     }
 
+    my $logout_url = RT->Config->Get('LogoutURL');
     if ( $current_user->Name
          && (   !RT->Config->Get('WebRemoteUserAuth')
               || RT->Config->Get('WebFallbackToRTLogin') )) {
-        $about_me->child( logout => title => loc('Logout'), path => '/NoAuth/Logout.html' );
+        $about_me->child( logout => title => loc('Logout'), path => $logout_url );
     }
 
     if ($current_user->HasRight( Right => 'ShowArticle', Object => RT->System )) {

commit 9917f01412ee967540216dd0f157b228240e23dd
Merge: ef42d9fc3 db0be5522
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Mon Feb 11 17:13:09 2019 -0500

    Merge branch '4.6/rt-logout-link-config'


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


More information about the rt-commit mailing list