X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fhtml%2FAdmin%2FElements%2FSelectRights;h=a0a5736f0a5471636b05bce05a49496d904bd53e;hb=3a17b276638200475d54201fa62566b7440e819a;hp=61a9e42ec8f46cf93ff8adac523615159d0bbca9;hpb=d39d52aac8f38ea9115628039f0df5aa3ac826de;p=freeside.git diff --git a/rt/html/Admin/Elements/SelectRights b/rt/html/Admin/Elements/SelectRights index 61a9e42ec..a0a5736f0 100644 --- a/rt/html/Admin/Elements/SelectRights +++ b/rt/html/Admin/Elements/SelectRights @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# 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., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -42,35 +44,38 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK - - - - + +
+%# END BPS TAGGED BLOCK }}} + + + + - + - -
+% my %current_rights;

<&|/l&>Current rights

-% if ($ACLObj->Count() > 0) { -(<&|/l&>Check box to revoke right)
+% if ($ACLObj->Count() == 0) { +<&|/l&>No rights granted.
% } else { -<&|/l&>No rights granted.
-% } +(<&|/l&>Check box to revoke right)
% while (my $right = $ACLObj->Next()) { % if ($right->RightName) { - <% loc($right->RightName) %>
+% $current_rights{$right->RightName} = 1; + <% loc($right->RightName) %>
% } % } -
+% } +

<&|/l&>New rights

- % foreach $right (sort keys %Rights) { - +% next if $current_rights{$right}; + % } - - -
+ + +
<%INIT> my ($right, $ACLDesc, $AppliesTo, %Rights); @@ -100,7 +105,7 @@ } else { - %Rights = { loc('System Error') => loc("No rights found")}; + %Rights = ( loc('System Error') => loc("No rights found") ); } $ACLDesc = "$PrincipalId-".ref($Object)."-".$Object->Id;