[Rt-commit] rt branch, 4.0/hide-new-ticket-selfservice, created. rt-4.0.4-219-g6f9572a
Kevin Falcone
falcone at bestpractical.com
Fri Jan 20 16:48:27 EST 2012
The branch, 4.0/hide-new-ticket-selfservice has been created
at 6f9572aa46b039197797ec07d3b08c31b9c3c9fd (commit)
- Log -----------------------------------------------------------------
commit 6f9572aa46b039197797ec07d3b08c31b9c3c9fd
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Aug 24 11:02:43 2010 -0400
Don't show a new ticket link if the user can't see any queues
We should consider making this depend on CreateTicket instead (perhaps
at the RT::Queues level), so that at least a user can create a new
ticket via the web UI even if they don't know what queue it's going
into. For users with CreateTicket on multiple queues, we'd have to use
a default queue setting of some sort, perhaps
RT->Config->Get('DefaultQueue').
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index bdf54b7..5f75e29 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -821,7 +821,7 @@ my $build_selfservice_nav = sub {
$queues->UnLimit;
my $queue_count = 0;
- my $queue_id = 1;
+ my $queue_id;
while ( my $queue = $queues->Next ) {
next unless $queue->CurrentUserHasRight('CreateTicket');
@@ -836,7 +836,7 @@ my $build_selfservice_nav = sub {
$tickets->child( closed => title => loc('Closed tickets'), path => '/SelfService/Closed.html' );
if ( $queue_count > 1 ) {
$tickets->child( new => title => loc('New ticket'), path => '/SelfService/CreateTicketInQueue.html' );
- } else {
+ } elsif ( $queue_id ) {
$tickets->child( new => title => loc('New ticket'), path => '/SelfService/Create.html?Queue=' . $queue_id );
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list