[Rt-commit] rt branch, 4.2/chart-ui-gc-settings, created. rt-4.2.2-129-g66c69d9
Wallace Reis
wreis at bestpractical.com
Tue Feb 18 19:57:07 EST 2014
The branch, 4.2/chart-ui-gc-settings has been created
at 66c69d9b1d2c99326f88a19280f48f898cb203d3 (commit)
- Log -----------------------------------------------------------------
commit c34b9f056c67f469d93e8ce84a06e88899c0f618
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Feb 14 01:21:50 2014 -0500
Pass the role type to the ACL method, as AddRoleMember does
This caused failures in removing watchers from tickets and queues, when
the remover only had Watch / WatchAsAcminCc; see [rt3 #29063]
This is now also consistent with how all existing _HasModifyWatcherRight
methods (the only functions currently passed for ACL) expect to be
called.
diff --git a/lib/RT/Record/Role/Roles.pm b/lib/RT/Record/Role/Roles.pm
index a6172b4..ac7e0c2 100644
--- a/lib/RT/Record/Role/Roles.pm
+++ b/lib/RT/Record/Role/Roles.pm
@@ -483,7 +483,7 @@ sub DeleteRoleMember {
my $acl = delete $args{ACL};
return (0, $self->loc("Permission denied"))
- if $acl and not $acl->($principal);
+ if $acl and not $acl->($args{Type} => $principal);
my $group = $self->RoleGroup( $args{Type} );
return (0, $self->loc("Role group '[_1]' not found", $args{Type}))
commit b3344e15d1c1596bb06cd8f7c30252f878d52387
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Fri Feb 14 01:24:23 2014 -0500
Document the ACL argument, as AddRoleMember does
diff --git a/lib/RT/Record/Role/Roles.pm b/lib/RT/Record/Role/Roles.pm
index ac7e0c2..c1e03fd 100644
--- a/lib/RT/Record/Role/Roles.pm
+++ b/lib/RT/Record/Role/Roles.pm
@@ -451,6 +451,12 @@ principal
Required. One of the valid roles for this record, as returned by L</Roles>.
+=item ACL
+
+Optional. A subroutine reference which will be passed the role type and
+principal being removed. If it returns false, the method will fail with a
+status of "Permission denied".
+
=back
One, and only one, of I<PrincipalId> or I<User> is required.
commit 66c69d9b1d2c99326f88a19280f48f898cb203d3
Author: Wallace Reis <wreis at bestpractical.com>
Date: Tue Feb 18 21:19:47 2014 -0300
Issues#29015 - Saved chart should load settings
Use the %ARGS which gets updated with data from $saved_search
and still honor the request payload in case the user wants to
update the chart.
diff --git a/share/html/Search/Chart.html b/share/html/Search/Chart.html
index 32fb651..4305756 100644
--- a/share/html/Search/Chart.html
+++ b/share/html/Search/Chart.html
@@ -102,6 +102,14 @@ my %query;
}
$m->callback( ARGSRef => \%ARGS, QueryArgsRef => \%query );
+
+ at GroupBy = ref $ARGS{'GroupBy'} ?
+ @{ $ARGS{'GroupBy'} }
+ : $ARGS{'GroupBy'};
+
+ at ChartFunction = ref $ARGS{'ChartFunction'} ?
+ @{ $ARGS{'ChartFunction'} }
+ : $ARGS{'ChartFunction'};
</%init>
<& /Elements/Header, Title => $title &>
<& /Elements/Tabs, QueryArgs => \%query &>
@@ -161,11 +169,11 @@ $m->callback( ARGSRef => \%ARGS, QueryArgsRef => \%query );
</&>
<&| /Widgets/TitleBox, title => loc('Picture'), class => "chart-picture" &>
-<label><% loc('Style') %>: <& Elements/SelectChartType, Default => $ChartStyle, Name => 'ChartStyle' &></label>
-<label><% loc("Width") %>: <input type="text" name="Width" value="<% $Width || "" %>"> <% loc("px") %></label>
+<label><% loc('Style') %>: <& Elements/SelectChartType, Default => $ARGS{ChartStyle}, Name => 'ChartStyle' &></label>
+<label><% loc("Width") %>: <input type="text" name="Width" value="<% $ARGS{Width} || "" %>"> <% loc("px") %></label>
<span class="height">
×
- <label><% loc("Height") %>: <input type="text" name="Height" value="<% $Height || "" %>"> <% loc("px") %></label>
+ <label><% loc("Height") %>: <input type="text" name="Height" value="<% $ARGS{Height} || "" %>"> <% loc("px") %></label>
</span>
</&>
<script type="text/javascript">
-----------------------------------------------------------------------
More information about the rt-commit
mailing list