Don't list Current Rights in New Rights

This patch makes it so that when selecting Rights
in RT, currently help rights are not also listed
in new rights. This makes things easier on my eyes
but it does mess with the alignment of list boxes
on the rights pages.

Anyone see a problem with this?

-Todd

— share/html/Admin/Elements/SelectRights.orig 2004-08-03 03:11:14.000000000 -0400
+++ share/html/Admin/Elements/SelectRights 2004-08-03 03:43:51.000000000 -0400
@@ -31,8 +31,10 @@
% } else {
<&|/l&>No rights granted.</&>

% }
+% my %CurrentRights;
% while (my $right = $ACLObj->Next()) {
% if ($right->RightName) {
+% $CurrentRights{$right->RightName} = 1;
<% loc($right->RightName) %>

% }
% }
@@ -41,8 +43,10 @@

<&|/l&>New rights

% foreach $right (sort keys %Rights) { +% if ($ShowCurrentRights || (! $ShowCurrentRights && ! $CurrentRights{$right})) { <% loc($right) %> +% } % } <&|/l&>(no value) @@ -88,4 +92,5 @@ $PrincipalType => undef $PrincipalId => undef $Object =>undef +$ShowCurrentRights => 0

Looks pretty reasonable. I’ll queue it for someone to have a look at
adding the feature to core.On Tue, Aug 03, 2004 at 12:58:30PM -0400, Todd Chapman wrote:

This patch makes it so that when selecting Rights
in RT, currently help rights are not also listed
in new rights. This makes things easier on my eyes
but it does mess with the alignment of list boxes
on the rights pages.

Anyone see a problem with this?

-Todd

— share/html/Admin/Elements/SelectRights.orig 2004-08-03 03:11:14.000000000 -0400
+++ share/html/Admin/Elements/SelectRights 2004-08-03 03:43:51.000000000 -0400
@@ -31,8 +31,10 @@
% } else {
<&|/l&>No rights granted.</&>

% }
+% my %CurrentRights;
% while (my $right = $ACLObj->Next()) {
% if ($right->RightName) {
+% $CurrentRights{$right->RightName} = 1;
<% loc($right->RightName) %>

% }
% }
@@ -41,8 +43,10 @@

<&|/l&>New rights

% foreach $right (sort keys %Rights) { +% if ($ShowCurrentRights || (! $ShowCurrentRights && ! $CurrentRights{$right})) { <% loc($right) %> +% } % } <&|/l&>(no value) @@ -88,4 +92,5 @@ $PrincipalType => undef $PrincipalId => undef $Object =>undef +$ShowCurrentRights => 0

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT wiki at http://wiki.bestpractical.com