%# $Header: /raid/cvsroot/rt/webrt/Admin/Elements/SelectQueueRights,v 1.2 2001/11/06 23:06:10 jesse Exp $

<SELECT NAME ="<%$Name%>">
<OPTION VALUE="">-</OPTION>
%foreach $right (@rights) {
<OPTION VALUE="<%$right%>" <%($Default eq $right) && 'SELECTED'%>><%$right%></OPTION>
% }
</SELECT>
<%ONCE>

use RT::ACE;
my $ACE = new RT::ACE($session{'CurrentUser'});
my %QueueRights = $ACE->QueueRights;
my %TicketRights = $ACE->TicketRights;

my ($key, $right, @rights);

foreach $key (sort keys %QueueRights) {
push (@rights, $QueueRights{$key} . " ($key)");
}
foreach $key (sort keys %TicketRights) {
push (@rights, $TicketRights{$key} . " ($key)");
}
</%ONCE>
<%ARGS>
$Name => undef
$Default => undef
 
</%ARGS>
