[Bps-public-commit] rt-extension-rightsdebugger branch, master, updated. f27424ae387fe09df25b5bcd19cff6edc4535709

Shawn Moore shawn at bestpractical.com
Tue Feb 28 15:57:54 EST 2017


The branch, master has been updated
       via  f27424ae387fe09df25b5bcd19cff6edc4535709 (commit)
      from  17c9694920d27c37b69c71db30f3bed5e5c9ca94 (commit)

Summary of changes:
 html/Admin/RightsDebugger/index.html | 6 +++---
 lib/RT/Extension/RightsDebugger.pm   | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit f27424ae387fe09df25b5bcd19cff6edc4535709
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Tue Feb 28 20:51:16 2017 +0000

    Support specifying Principal, Object, Right in query params
    
    For linking into the debugger from the rest of RT

diff --git a/html/Admin/RightsDebugger/index.html b/html/Admin/RightsDebugger/index.html
index 2af85f6..d9aec54 100644
--- a/html/Admin/RightsDebugger/index.html
+++ b/html/Admin/RightsDebugger/index.html
@@ -3,9 +3,9 @@
 
 <form action="<%RT->Config->Get('WebPath')%>/Helpers/RightsDebugger/Search" id="rights-debugger">
   <div class="search">
-    <input type="text" name="principal" placeholder="Principal">
-    <input type="text" name="object" placeholder="Object">
-    <input type="text" name="right" placeholder="Right">
+    <input value="<% $ARGS{Principal} %>" type="text" name="principal" placeholder="Principal">
+    <input value="<% $ARGS{Object} %>" type="text" name="object" placeholder="Object">
+    <input value="<% $ARGS{Right} %>" type="text" name="right" placeholder="Right">
     <span class="loading"><img src="<%RT->Config->Get('WebPath')%>/static/images/loading.gif" alt="<%loc('Loading')%>" title="<%loc('Loading')%>" /></span>
   </div>
   <div class="results">
diff --git a/lib/RT/Extension/RightsDebugger.pm b/lib/RT/Extension/RightsDebugger.pm
index d3f42d5..9dd9925 100644
--- a/lib/RT/Extension/RightsDebugger.pm
+++ b/lib/RT/Extension/RightsDebugger.pm
@@ -8,6 +8,9 @@ RT->AddStyleSheets("rights-debugger.css");
 RT->AddJavaScript("rights-debugger.js");
 RT->AddJavaScript("handlebars-4.0.6.min.js");
 
+
+$RT::Interface::Web::WHITELISTED_COMPONENT_ARGS{'/Admin/RightsDebugger/index.html'} = ['Principal', 'Object', 'Right'];
+
 sub SerializeACE {
     my $self = shift;
     my $ACE = shift;

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


More information about the Bps-public-commit mailing list