[Rt-commit] [rtir] 04/04: RedirectOnLogin config

Kevin Falcone falcone at bestpractical.com
Wed Aug 13 21:11:33 EDT 2014


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 3.2/redirect-on-login
in repository rtir.

commit 49e69c496c6e6aa5b36ee780bc637f4c4d029697
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Aug 13 18:25:49 2014 -0400

    RedirectOnLogin config
    
    To disable the new "DutyTeam members redirect to /RTIR/" feature
---
 etc/RTIR_Config.pm                              | 13 +++++++++++++
 html/Callbacks/RTIR/autohandler/SuccessfulLogin |  2 ++
 2 files changed, 15 insertions(+)

diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index 3efd09e..ad35ec7 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -274,6 +274,19 @@ Set(%RTIR_IncidentChildren,
     },
 );
 
+=item C<$RedirectOnLogin>
+
+If set to a true value, will redirect members of DutyTeam groups to
+/RTIR/ upon login so that they immediately see the RTIR Homepage (rather
+than their RT Homepage).  This does not change where Home in the menu
+links to, since you can get to the RTIR homepage from RTIR at the top
+level, and users may wish to have more custom searches stashed on their
+Home page.
+
+=cut
+
+Set($RedirectOnLogin, 1);
+
 =back
 
 =head1 Web Interface Configuration
diff --git a/html/Callbacks/RTIR/autohandler/SuccessfulLogin b/html/Callbacks/RTIR/autohandler/SuccessfulLogin
index c432db1..1ca6425 100644
--- a/html/Callbacks/RTIR/autohandler/SuccessfulLogin
+++ b/html/Callbacks/RTIR/autohandler/SuccessfulLogin
@@ -50,6 +50,8 @@ if (defined $$RedirectTo &&
     $$RedirectTo ne '/') {
     return;
 }
+return unless RT->Config->Get('RedirectOnLogin');
+
 if (RT::IR->IsStaff($session{'CurrentUser'}->Id)) {
 # no need for WebPath since Redirect() adds on the whole server URL
     $$RedirectTo = '/RTIR/';

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list