[Bps-public-commit] RT-BugTracker-Public branch, 4.2-4.4-compatibility, updated. 1.00-22-gf0ca4c7

Shawn Moore shawn at bestpractical.com
Wed Mar 29 17:36:34 EDT 2017


The branch, 4.2-4.4-compatibility has been updated
       via  f0ca4c7f801b99641a7e6d386d28ac5c55edbf41 (commit)
       via  2d29feeef8598490e9d1ba293cdba0d2986c8ab8 (commit)
      from  cf4814ba1fd8ef6505abbd918e57e60679e7f9e0 (commit)

Summary of changes:
 .../Callbacks/BugTracker-Public/Elements/Tabs/Privileged | 16 ++++++++++------
 lib/RT/BugTracker/Public.pm                              |  7 ++++++-
 2 files changed, 16 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 2d29feeef8598490e9d1ba293cdba0d2986c8ab8
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Mar 29 21:22:04 2017 +0000

    Respect WebPublicUserReporting to suppress new ticket UI

diff --git a/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged b/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
index 8b37d2c..07de3e7 100644
--- a/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
+++ b/html/Callbacks/BugTracker-Public/Elements/Tabs/Privileged
@@ -62,8 +62,10 @@ RT::Interface::Web::InitializeMenu();
 PageWidgets()->child( simple_search => raw_html => $m->scomp(
     '/Elements/SimpleSearch', SendTo => '/Public/Search/Simple.html' ));
 
-PageWidgets()->child( create_ticket => raw_html => $m->scomp(
-    '/Elements/CreateTicket', SendTo => '/Public/Bug/Report.html' ));
+if (RT->Config->Get('WebPublicUserReporting')) {
+    PageWidgets()->child( create_ticket => raw_html => $m->scomp(
+        '/Elements/CreateTicket', SendTo => '/Public/Bug/Report.html' ));
+}
 
 Menu()->child(
     search_dist => title => loc('Search Distributions'),
@@ -139,10 +141,12 @@ if ( $queue and $queue->id ) {
             path  => "/Public/Dist/Display.html?Status=Rejected;Name=". $escaped,
     );
 
-    PageMenu()->child( report => 
-            title => loc("Report a new bug"),
-            path  => '/Public/Bug/Report.html?Queue='. $escaped,
-    );
+    if (RT->Config->Get('WebPublicUserReporting')) {
+        PageMenu()->child( report =>
+                title => loc("Report a new bug"),
+                path  => '/Public/Bug/Report.html?Queue='. $escaped,
+        );
+    }
 
     if ($ticket and $ticket->id
         and $queue->LifecycleObj->IsInactive($ticket->Status)

commit f0ca4c7f801b99641a7e6d386d28ac5c55edbf41
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Mar 29 21:36:14 2017 +0000

    Add support for WebPublicUserQueryBuilder
    
    Fixes: T#182770

diff --git a/lib/RT/BugTracker/Public.pm b/lib/RT/BugTracker/Public.pm
index 536a0af..af53750 100644
--- a/lib/RT/BugTracker/Public.pm
+++ b/lib/RT/BugTracker/Public.pm
@@ -192,8 +192,13 @@ sub RedirectToPublic {
         return "/Public$path";
     }
 
+    elsif ( RT->Config->Get('WebPublicUserQueryBuilder')) {
+        return undef if $path =~ '^/+Search/Build.html'
+                     || $path =~ '^/+Search/Results.html'
+    }
+
     # otherwise, drop the user at the Public default page
-    elsif (    $path !~ '^(/+)Public/'
+    if (       $path !~ '^(/+)Public/'
            and $path !~ RT->Config->Get('WebNoAuthRegex')
            and $path !~ '^/+Helpers/Autocomplete/Queues' ) {
         return "/Public/";

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


More information about the Bps-public-commit mailing list