[Rt-commit] rt branch, 4.6/core-rightinspector, updated. rt-4.4.4-382-gfb35100b2

Michel Rodriguez michel at bestpractical.com
Fri Sep 6 16:17:05 EDT 2019


The branch, 4.6/core-rightinspector has been updated
       via  fb35100b212808c0d154c0225e45703461f2d9eb (commit)
       via  b48b3136eaa30e5501c91843de5167cde3ea9a23 (commit)
      from  df28185732e0c42640ac040aa98f86ae88e7e8c0 (commit)

Summary of changes:
 lib/RT/RightsInspector.pm           | 52 +++++++++++++++++++++++++++++++++++--
 share/static/js/rights-inspector.js |  8 ++++--
 2 files changed, 56 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit b48b3136eaa30e5501c91843de5167cde3ea9a23
Author: michel <michel at bestpractical.com>
Date:   Fri Sep 6 22:13:19 2019 +0200

    Fixes a problem with the display of disabled revoke buttons

diff --git a/share/static/js/rights-inspector.js b/share/static/js/rights-inspector.js
index 0bba28c77..05e148b24 100644
--- a/share/static/js/rights-inspector.js
+++ b/share/static/js/rights-inspector.js
@@ -194,14 +194,18 @@ function link_or_text (text, url) {
 }
 
 function render_inspector_result (item) {
-    var disabled_state = item.disable_revoke ? 'class="ui-state-disabled" disabled="disabled"' : '';
+    var disabled_state = item.disable_revoke ? ' disabled="disabled"' : '';
+    var disabled_class = item.disable_revoke ? ' ui-state-disabled'   : '';
+    var revoke_action  = RT.Config.WebPath + '/Helpers/RightsInspector/Revoke?id=' + item.ace.id;
 
     return '<div class="result row">'
         +  '  <div class="principal cell col-md-3">' + render_inspector_record( item.principal) + '</div>'
         +  '  <div class="object cell col-md-3">' + render_inspector_record( item.object) + '</div>'
         +  '  <div class="right cell col-md-3">' + item.right_highlighted + '</div>'
         +  '  <div class="revoke cell col-md-1">'
-        +  '      <button type="button" class="revoke-button" data-action="' + RT.Config.WebPath + '/Helpers/RightsInspector/Revoke?id=' + item.ace.id + '" ' + disabled_state + '>Revoke</button>'
+        +  '      <button type="button" class="revoke-button' + disabled_class + '"'
+        +             ' data-action="' + revoke_action + '" '
+        +             disabled_state + '>Revoke</button>'
         + '  </div>'
         + '</div>'
     ;

commit fb35100b212808c0d154c0225e45703461f2d9eb
Author: michel <michel at bestpractical.com>
Date:   Fri Sep 6 22:14:28 2019 +0200

    Fixes 2 problems with t/99-policy.t testing

diff --git a/lib/RT/RightsInspector.pm b/lib/RT/RightsInspector.pm
index e824b1374..eac2a5cf9 100644
--- a/lib/RT/RightsInspector.pm
+++ b/lib/RT/RightsInspector.pm
@@ -1,3 +1,51 @@
+# BEGIN BPS TAGGED BLOCK {{{
+#
+# COPYRIGHT:
+#
+# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
+#                                          <sales at bestpractical.com>
+#
+# (Except where explicitly superseded by other copyright notices)
+#
+#
+# LICENSE:
+#
+# This work is made available to you under the terms of Version 2 of
+# the GNU General Public License. A copy of that license should have
+# been provided with this software, but in any event can be snarfed
+# from www.gnu.org.
+#
+# This work is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 or visit their web page on the internet at
+# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+#
+#
+# CONTRIBUTION SUBMISSION POLICY:
+#
+# (The following paragraph is not intended to limit the rights granted
+# to you to modify and distribute this software under the terms of
+# the GNU General Public License and is only of importance to you if
+# you choose to contribute your changes and enhancements to the
+# community by submitting them to Best Practical Solutions, LLC.)
+#
+# By intentionally submitting any modifications, corrections or
+# derivatives to this work, or any other work intended for use with
+# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+# you are the copyright holder for those contributions and you grant
+# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+# royalty-free, perpetual, license to use, copy, create derivative
+# works based on those contributions, and sublicense and distribute
+# those contributions and any derivatives thereof.
+#
+# END BPS TAGGED BLOCK }}}
+
 package RT::RightsInspector;
 use strict;
 use warnings;
@@ -526,8 +574,8 @@ sub Search {
         }
 
         KEY: for my $key (qw/principal object/) {
-	    # filtering on the serialized record is hacky, but doing the
-	    # searching in SQL is absolutely a nonstarter
+            # filtering on the serialized record is hacky, but doing the
+            # searching in SQL is absolutely a nonstarter
             next KEY unless $use_regex_search_for{$key};
 
             if (my $term = $args{$key}) {

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


More information about the rt-commit mailing list