[Rt-commit] rt branch, 4.4/move-user-prefs-page-to-prefs-aboutme, repushed

Dustin Graves dustin at bestpractical.com
Fri Sep 25 17:46:46 EDT 2015


The branch 4.4/move-user-prefs-page-to-prefs-aboutme was deleted and repushed:
       was 037d02cbe258581d067672d35a4c961065ecdd16
       now ab5b66adfaeef8a22e1537e9c9fb20b3f19b2f75

1:  a7aba60 ! 1:  ab5b66a move /User/Prefs.html to /Prefs/AboutMe.html for consistency, and redirect old /User/Prefs.html & deprecate it
    @@ -1,6 +1,28 @@
     Author: sunnavy <sunnavy at bestpractical.com>
     
    -    move /User/Prefs.html to /Prefs/AboutMe.html for consistency, see also #14200
    +    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
    +--- a/lib/RT/Interface/Web.pm
    ++++ b/lib/RT/Interface/Web.pm
    +@@
    +     # 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
     --- a/share/html/Elements/Tabs
    @@ -24,7 +46,7 @@
     +%#
     +%# COPYRIGHT:
     +%#
    -+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
    ++%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     +%#                                          <sales at bestpractical.com>
     +%#
     +%# (Except where explicitly superseded by other copyright notices)
    @@ -102,6 +124,7 @@
     +    <td class="label"><&|/l&>Timezone</&>:</td>
     +    <td class="value"><& /Elements/SelectTimezone, Name => 'Timezone', Default => $UserObj->Timezone &></td>
     +  </tr>
    ++<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Identity', InTable => 1 &>
     +</table>
     +</&>
     +<&| /Widgets/TitleBox, title => loc('Phone numbers'), id => "user-prefs-phone" &>
    @@ -122,11 +145,12 @@
     +    <td class="label"><&|/l&>Pager</&>:</td>
     +    <td class="value"><input name="PagerPhone" value="<%$UserObj->PagerPhone || ''%>" size="13" /></td>
     +  </tr>
    ++<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Phones', InTable => 1 &>
     +</table>
     +</&>
     +
     +%if ($UserObj->Privileged) {
    -+<&| /Widgets/TitleBox, title => loc('Signature') &>
    ++<&| /Widgets/TitleBox, title => loc('Signature'), id => "user-prefs-signature" &>
     +<textarea cols="80" rows="5" name="Signature" class="signature" wrap="hard">
     +<%$UserObj->Signature || ''%></textarea>
     +</&>
    @@ -141,6 +165,9 @@
     +    User => $UserObj,
     +    Name => [qw(CurrentPass Pass1 Pass2)],
     +&>
    ++
    ++<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Access control' &>
    ++
     +</&>
     +
     +<&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &>
    @@ -173,25 +200,21 @@
     +    <td class="label"><&|/l&>Country</&>:</td>
     +    <td class="value"><input name="Country" value="<%$UserObj->Country || ''%>" /></td>
     +  </tr>
    ++<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Location', InTable => 1 &>
     +</table>
     +</&>
     +
    -+<&| /Widgets/TitleBox, title => loc('Custom Fields') &>
    -+<table>
    -+% my $CustomFields = $UserObj->CustomFields;
    -+% while ( my $CF = $CustomFields->Next ) {
    -+<tr valign="top">
    -+<td align="right"><% loc( $CF->Name ) %>:</td>
    -+<td><& /Elements/EditCustomField,
    -+    %ARGS, Object => $UserObj, CustomField => $CF
    -+&></td></tr>
    -+% }
    -+</table>
    -+</&>
    ++
    ++
    ++<& /Elements/EditCustomFieldCustomGroupings, Object => $UserObj &>
    ++
    ++
    ++
    ++<& /Elements/Submit, Label => loc('Save Preferences') &>
     +
     +<&| /Widgets/TitleBox, title => loc('Secret authentication token'), id => "user-prefs-feeds" &>
     +
    -+<&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b> below.</&>
    ++<&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL for one of your iCal feeds was exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b>, below.</&>
     +
     +<a href="#" id="ResetAuthTokenPrompt" style="display: none">
     +  <&|/l&>I want to reset my secret token.</&>
    @@ -218,7 +241,6 @@
     +
     +% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormEnd' );
     +
    -+<& /Elements/Submit, Label => loc('Save Preferences') &>
     +</form>
     +
     +
    @@ -341,7 +363,7 @@
     -%#
     -%# COPYRIGHT:
     -%#
    --%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
    +-%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
     -%#                                          <sales at bestpractical.com>
     -%#
     -%# (Except where explicitly superseded by other copyright notices)
    @@ -419,6 +441,7 @@
     -    <td class="label"><&|/l&>Timezone</&>:</td>
     -    <td class="value"><& /Elements/SelectTimezone, Name => 'Timezone', Default => $UserObj->Timezone &></td>
     -  </tr>
    +-<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Identity', InTable => 1 &>
     -</table>
     -</&>
     -<&| /Widgets/TitleBox, title => loc('Phone numbers'), id => "user-prefs-phone" &>
    @@ -439,11 +462,12 @@
     -    <td class="label"><&|/l&>Pager</&>:</td>
     -    <td class="value"><input name="PagerPhone" value="<%$UserObj->PagerPhone || ''%>" size="13" /></td>
     -  </tr>
    +-<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Phones', InTable => 1 &>
     -</table>
     -</&>
     -
     -%if ($UserObj->Privileged) {
    --<&| /Widgets/TitleBox, title => loc('Signature') &>
    +-<&| /Widgets/TitleBox, title => loc('Signature'), id => "user-prefs-signature" &>
     -<textarea cols="80" rows="5" name="Signature" class="signature" wrap="hard">
     -<%$UserObj->Signature || ''%></textarea>
     -</&>
    @@ -458,6 +482,9 @@
     -    User => $UserObj,
     -    Name => [qw(CurrentPass Pass1 Pass2)],
     -&>
    +-
    +-<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Access control' &>
    +-
     -</&>
     -
     -<&| /Widgets/TitleBox, title => loc('Location'), id => "user-prefs-location" &>
    @@ -490,25 +517,21 @@
     -    <td class="label"><&|/l&>Country</&>:</td>
     -    <td class="value"><input name="Country" value="<%$UserObj->Country || ''%>" /></td>
     -  </tr>
    +-<& /Elements/EditCustomFields, Object => $UserObj, Grouping => 'Location', InTable => 1 &>
     -</table>
     -</&>
     -
    --<&| /Widgets/TitleBox, title => loc('Custom Fields') &>
    --<table>
    --% my $CustomFields = $UserObj->CustomFields;
    --% while ( my $CF = $CustomFields->Next ) {
    --<tr valign="top">
    --<td align="right"><% loc( $CF->Name ) %>:</td>
    --<td><& /Elements/EditCustomField,
    --    %ARGS, Object => $UserObj, CustomField => $CF
    --&></td></tr>
    --% }
    --</table>
    --</&>
    +-
    +-
    +-<& /Elements/EditCustomFieldCustomGroupings, Object => $UserObj &>
    +-
    +-
    +-
    +-<& /Elements/Submit, Label => loc('Save Preferences') &>
     -
     -<&| /Widgets/TitleBox, title => loc('Secret authentication token'), id => "user-prefs-feeds" &>
     -
    --<&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL one of your iCal feeds got exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b> below.</&>
    +-<&|/l&>All iCal feeds embed a secret token which authorizes you.  If the URL for one of your iCal feeds was exposed to the outside world, you can get a new secret, <b>breaking all existing iCal feeds</b>, below.</&>
     -
     -<a href="#" id="ResetAuthTokenPrompt" style="display: none">
     -  <&|/l&>I want to reset my secret token.</&>
    @@ -535,7 +558,6 @@
     -
     -% $m->callback( %ARGS, UserObj => $UserObj, CallbackName => 'FormEnd' );
     -
    --<& /Elements/Submit, Label => loc('Save Preferences') &>
     -</form>
     -
     -
    @@ -648,4 +670,3 @@
     -$Pass2 => undef
     -$Create=> undef
     -</%ARGS>
    -
2:  037d02c < -:  ------- redirect old /User/Prefs.html and deprecate it



More information about the rt-commit mailing list