[Rt-commit] [rtir] 01/02: RedirectOnLogin config

Kevin Falcone falcone at bestpractical.com
Tue Aug 19 14:07:28 EDT 2014


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

falcone pushed a commit to branch master
in repository rtir.

commit d047324f46c60669c5514b2cfcc0ac739f66f8ff
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..677888d 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -274,6 +274,19 @@ Set(%RTIR_IncidentChildren,
     },
 );
 
+=item C<$RTIR_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($RTIR_RedirectOnLogin, 1);
+
 =back
 
 =head1 Web Interface Configuration
diff --git a/html/Callbacks/RTIR/autohandler/SuccessfulLogin b/html/Callbacks/RTIR/autohandler/SuccessfulLogin
index c432db1..9d73ac5 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('RTIR_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