[Rt-commit] rt branch, 4.4/move-user-prefs-page-to-prefs-aboutme, created. rt-4.2.11-218-gc1bebcc

Dustin Graves dustin at bestpractical.com
Thu Oct 1 09:46:34 EDT 2015


The branch, 4.4/move-user-prefs-page-to-prefs-aboutme has been created
        at  c1bebcc613b22c0e740d3d1b8b7f793903137e46 (commit)

- Log -----------------------------------------------------------------
commit c1bebcc613b22c0e740d3d1b8b7f793903137e46
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sun May 5 12:58:25 2013 +0800

    move /User/Prefs.html to /Prefs/AboutMe.html for consistency, and redirect old /User/Prefs.html & deprecate it
    
    Fixes:I#14200

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index b936325..8406762 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -662,6 +662,15 @@ sub ShowRequestedPage {
     # precache all system level rights for the current user
     $HTML::Mason::Commands::session{CurrentUser}->PrincipalObj->HasRights( Object => RT->System );
 
+    if ( $HTML::Mason::Commands::r->path_info =~ m{^(/+)User/Prefs.html} ) {
+        RT->Deprecated(
+            Message => '/User/Prefs.html is deprecated',
+            Instead => "/Prefs/AboutMe.html",
+            Stack   => 0,
+        );
+        RT::Interface::Web::Redirect( RT->Config->Get('WebURL') . 'Prefs/AboutMe.html' );
+    }
+
     # If the user isn't privileged, they can only see SelfService
     unless ( $HTML::Mason::Commands::session{'CurrentUser'}->Privileged ) {
 
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 9a39f5e..a55754a 100644
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -578,7 +578,7 @@ my $build_main_nav = sub {
          && $session{'CurrentUser'}->HasRight( Right => 'ModifySelf', Object => RT->System )) {
         my $settings = $about_me->child( settings => title => loc('Settings'), path => '/Prefs/Other.html' );
         $settings->child( options        => title => loc('Preferences'),        path => '/Prefs/Other.html' );
-        $settings->child( about_me       => title => loc('About me'),       path => '/User/Prefs.html' );
+        $settings->child( about_me       => title => loc('About me'),       path => '/Prefs/AboutMe.html' );
         $settings->child( search_options => title => loc('Search options'), path => '/Prefs/SearchOptions.html' );
         $settings->child( myrt           => title => loc('RT at a glance'), path => '/Prefs/MyRT.html' );
         $settings->child( dashboards_in_menu =>
diff --git a/share/html/User/Prefs.html b/share/html/Prefs/AboutMe.html
similarity index 99%
rename from share/html/User/Prefs.html
rename to share/html/Prefs/AboutMe.html
index 3ae793e..5cb9a31 100644
--- a/share/html/User/Prefs.html
+++ b/share/html/Prefs/AboutMe.html
@@ -50,7 +50,7 @@
 
 <& /Elements/ListActions, actions => \@results &>
 
-<form action="<%RT->Config->Get('WebPath')%>/User/Prefs.html" method="post">
+<form action="<%RT->Config->Get('WebPath')%>/Prefs/AboutMe.html" method="post">
 <input type="hidden" class="hidden" name="id" value="<%$UserObj->Id%>" />
 
 <table width="100%" border="0">

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


More information about the rt-commit mailing list