diff options
author | mark <mark> | 2011-01-01 00:47:01 +0000 |
---|---|---|
committer | mark <mark> | 2011-01-01 00:47:01 +0000 |
commit | c587b5fdc7175c2a752558efccfc3f424cff6c0d (patch) | |
tree | f065f2c68393c0300af30b0d5d1889ee7134756f /httemplate | |
parent | 0bebde603df97eb496150e80a58755b2f792f64a (diff) |
limit ticket creation queue dropdowns based on ACL, RT#7778
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/view/cust_main/tickets.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index e90ae5276..eea5a7f98 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -11,7 +11,9 @@ function updateTicketLink() { </SCRIPT> <A id="CreateTicketLink" HREF="<% $new_link %>">Create new ticket</A> in queue -% my %queues = FS::TicketSystem->queues(); +%# fetch list of queues in which the user can create tickets +% my $session = FS::TicketSystem->session(); +% my %queues = FS::TicketSystem->queues($session, 'CreateTicket'); % if( $conf->exists('ticket_system-force_default_queueid') ) { <B><% $queues{$new_param{'Queue'}} %></B> <INPUT TYPE="hidden" NAME="Queue" VALUE="<% $new_param{'Queue'} %>"> @@ -19,7 +21,6 @@ function updateTicketLink() { % else { <SELECT NAME="Queue" id="Queue" onchange="updateTicketLink()"> % foreach my $queueid ( sort { $queues{$a} cmp $queues{$b} } keys %queues ) { -% #should consider whether the user has ACL to create ticket in each queue <OPTION VALUE="<% $queueid %>" <% $queueid == $new_param{'Queue'} ? 'SELECTED' : '' %> ><% $queues{$queueid} |h %> |