[Rt-commit] rt branch, 4.4/prune-self-service, created. rt-4.4.1-125-g19f8d52

Jim Brandt jbrandt at bestpractical.com
Wed Oct 19 08:49:33 EDT 2016


The branch, 4.4/prune-self-service has been created
        at  19f8d5225fcfa109cd3c3ab20f08ddcf93e0cce6 (commit)

- Log -----------------------------------------------------------------
commit c317aced32f31c6f8f8f9769fa16c9522f6c6e3e
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Oct 18 13:24:39 2016 -0400

    Also hide time displayed in correspond transactions
    
    When HideTimeFieldsFromUnprivilegedUsers is set, also hide
    the time displayed in correspond headers if the user sending
    the reply also recorded some time.

diff --git a/share/html/Elements/ShowHistoryPage b/share/html/Elements/ShowHistoryPage
index af5535d..f4519bf 100644
--- a/share/html/Elements/ShowHistoryPage
+++ b/share/html/Elements/ShowHistoryPage
@@ -116,7 +116,7 @@ while ( my $Transaction = $Transactions->Next ) {
     }
 
     # Skip Time Worked fields if user is unprivileged and
-    # HideTimeWorkedForUnprivilegedUsers is set.
+    # HideTimeFieldsFromUnprivilegedUsers is set.
     $skip = 1 if $Object->isa("RT::Ticket") and
                  not $Object->CurrentUserCanSeeTime and
                  ($Transaction->Field || '') =~ /^Time(?:Estimated|Worked|Left)$/;
diff --git a/share/html/Elements/ShowTransaction b/share/html/Elements/ShowTransaction
index 8a2eecb..b60ffb0 100644
--- a/share/html/Elements/ShowTransaction
+++ b/share/html/Elements/ShowTransaction
@@ -60,7 +60,9 @@
       <& /Elements/ShowUser, User => $Transaction->CreatorObj &> - <% $desc |n %>
 % $m->callback( %ARGS, Transaction => $Transaction, CallbackName => 'AfterDescription' );
     </span>
+% if ( $Object->isa("RT::Ticket") and $Object->CurrentUserCanSeeTime ) {
     <span class="time-taken"><% $time %></span>
+% }
 % if ( $actions ) {
     <span class="actions"><% $actions |n %></span>
 % }

commit 7e3e17cf1d9162ff827cb7c86c6f6a68a8a57a8c
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Oct 18 13:58:54 2016 -0400

    Add an option to filter Self Service history to only correspondence

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 1d2d436..8b61cf5 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1720,6 +1720,23 @@ Set($HideTimeFieldsFromUnprivilegedUsers, 0);
 
 =back
 
+=head2 Self Service Interface
+
+The Self Service Interface is a view automatically presented to Unprivileged
+users who have a password and log into the web UI. The following options
+modify the default behavior of the Self Service pages.
+
+=over 4
+
+=item C<$SelfServiceCorrespondenceOnly>
+
+On the ticket display page, show only correspondence transactions in the
+ticket history. This hides all ticket update transactions like status changes,
+custom field updates, updates to watchers, etc.
+
+=cut
+
+Set($SelfServiceCorrespondenceOnly, 0);
 
 =head2 Articles
 
diff --git a/share/html/Elements/ShowHistoryPage b/share/html/Elements/ShowHistoryPage
index f4519bf..fd714d7 100644
--- a/share/html/Elements/ShowHistoryPage
+++ b/share/html/Elements/ShowHistoryPage
@@ -121,6 +121,10 @@ while ( my $Transaction = $Transactions->Next ) {
                  not $Object->CurrentUserCanSeeTime and
                  ($Transaction->Field || '') =~ /^Time(?:Estimated|Worked|Left)$/;
 
+    $skip = 1 if $m->request_path =~ m{^/SelfService/}
+        and RT::Config->Get('SelfServiceCorrespondenceOnly')
+        and $Transaction->Type ne "Correspond";
+
     $m->callback(
         %ARGS,
         Transaction   => $Transaction,

commit 2adef2d212ba351c9bee31b04df080a8933c3a8d
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Oct 18 14:28:32 2016 -0400

    Create docs section for Self Service config options

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 8b61cf5..2d8c9d8 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1160,17 +1160,6 @@ are extending RT.
 
 Set($WebNoAuthRegex, qr{^ (?:/+NoAuth/ | /+REST/\d+\.\d+/NoAuth/) }x );
 
-=item C<$SelfServiceRegex>
-
-What portion of RT's URLspace should be accessible to Unprivileged
-users This does not override the redirect from F</Ticket/Display.html>
-to F</SelfService/Display.html> when Unprivileged users attempt to
-access ticked displays.
-
-=cut
-
-Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x );
-
 =item C<$WebFlushDbCacheEveryRequest>
 
 By default, RT clears its database cache after every page view.  This
@@ -1377,20 +1366,6 @@ Display search result count on ticket lists. Defaults to 0 (hide them).
 
 Set($ShowSearchResultCount, 0);
 
-=item C<$DefaultSelfServiceSearchResultFormat>
-
-C<$DefaultSelfServiceSearchResultFormat> is the default format of
-searches displayed in the SelfService interface.
-
-=cut
-
-Set($DefaultSelfServiceSearchResultFormat, qq{
-   '<B><A HREF="__WebPath__/SelfService/Display.html?id=__id__">__id__</a></B>/TITLE:#',
-   '<B><A HREF="__WebPath__/SelfService/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
-   Status,
-   Requestors,
-   Owner});
-
 =item C<%FullTextSearch>
 
 Full text search (FTS) without database indexing is a very slow
@@ -1609,16 +1584,6 @@ Set($UserSearchFields, {
     RealName     => 'LIKE',
 });
 
-=item C<$AllowUserAutocompleteForUnprivileged>
-
-Should unprivileged users (users of SelfService) be allowed to
-autocomplete users. Setting this option to 1 means unprivileged users
-will be able to search all your users.
-
-=cut
-
-Set($AllowUserAutocompleteForUnprivileged, 0);
-
 =item C<$TicketAutocompleteFields>
 
 Specifies which fields of L<RT::Ticket> to match against and how to match each
@@ -1708,16 +1673,6 @@ Set this to 1 to hide unset fields.
 
 Set($HideUnsetFieldsOnDisplay, 0);
 
-=item C<$HideTimeFieldsFromUnprivilegedUsers>
-
-This determines if we should hide Time Worked, Time Estimated, and
-Time Left for unprivileged users.
-Set this to 1 to hide those fields.
-
-=cut
-
-Set($HideTimeFieldsFromUnprivilegedUsers, 0);
-
 =back
 
 =head2 Self Service Interface
@@ -1738,6 +1693,53 @@ custom field updates, updates to watchers, etc.
 
 Set($SelfServiceCorrespondenceOnly, 0);
 
+=item C<$HideTimeFieldsFromUnprivilegedUsers>
+
+This determines if we should hide Time Worked, Time Estimated, and
+Time Left for unprivileged users.
+Set this to 1 to hide those fields.
+
+=cut
+
+Set($HideTimeFieldsFromUnprivilegedUsers, 0);
+
+=item C<$AllowUserAutocompleteForUnprivileged>
+
+Should unprivileged users (users of SelfService) be allowed to
+autocomplete users. Setting this option to 1 means unprivileged users
+will be able to search all your users.
+
+=cut
+
+Set($AllowUserAutocompleteForUnprivileged, 0);
+
+=item C<$DefaultSelfServiceSearchResultFormat>
+
+C<$DefaultSelfServiceSearchResultFormat> is the default format of
+searches displayed in the SelfService interface.
+
+=cut
+
+Set($DefaultSelfServiceSearchResultFormat, qq{
+   '<B><A HREF="__WebPath__/SelfService/Display.html?id=__id__">__id__</a></B>/TITLE:#',
+   '<B><A HREF="__WebPath__/SelfService/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
+   Status,
+   Requestors,
+   Owner});
+
+=item C<$SelfServiceRegex>
+
+What portion of RT's URLspace should be accessible to Unprivileged
+users This does not override the redirect from F</Ticket/Display.html>
+to F</SelfService/Display.html> when Unprivileged users attempt to
+access ticked displays.
+
+=cut
+
+Set($SelfServiceRegex, qr!^(?:/+SelfService/)!x );
+
+=back
+
 =head2 Articles
 
 =over 4

commit 19f8d5225fcfa109cd3c3ab20f08ddcf93e0cce6
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Oct 18 14:29:39 2016 -0400

    Fix incorrect POD links

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 2d8c9d8..c34c04e 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1243,7 +1243,7 @@ This setting defines the possible homepage and search result refresh
 options. Each value is a number of seconds. You should not include a value
 of C<0>, as that is always provided as an option.
 
-See also L</HomePageRefreshInterval> and L</SearchResultsRefreshInterval>.
+See also L</$HomePageRefreshInterval> and L</$SearchResultsRefreshInterval>.
 
 =cut
 

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


More information about the rt-commit mailing list