[rt-users] Don't list Current Rights in New Rights
Todd Chapman
rt at chaka.net
Tue Aug 3 12:58:30 EDT 2004
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 {
<i><&|/l&>No rights granted.</&></i> <BR>
% }
+% my %CurrentRights;
% while (my $right = $ACLObj->Next()) {
% if ($right->RightName) {
+% $CurrentRights{$right->RightName} = 1;
<input type=checkbox value="<%$right->Id%>" name="RevokeRight-<%$ACLDesc%>-<%$right->RightName%>"> <% loc($right->RightName) %><br>
% }
% }
@@ -41,8 +43,10 @@
<h3><&|/l&>New rights</&></h3>
<SELECT SIZE=5 MULTIPLE NAME="GrantRight-<%$ACLDesc%>">
% foreach $right (sort keys %Rights) {
+% if ($ShowCurrentRights || (! $ShowCurrentRights && ! $CurrentRights{$right})) {
<OPTION VALUE="<%$right%>"
><% loc($right) %></OPTION>
+% }
% }
<OPTION VALUE="" SELECTED><&|/l&>(no value)</&></OPTION>
</SELECT>
@@ -88,4 +92,5 @@
$PrincipalType => undef
$PrincipalId => undef
$Object =>undef
+$ShowCurrentRights => 0
</%ARGS>
More information about the rt-users
mailing list