[Rt-commit] r13149 - in rt/branches/3.8-TESTING: . share/html/Ticket
sartak at bestpractical.com
sartak at bestpractical.com
Tue Jun 10 20:01:32 EDT 2008
Author: sartak
Date: Tue Jun 10 20:01:32 2008
New Revision: 13149
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm
rt/branches/3.8-TESTING/share/html/Ticket/Create.html
Log:
r62155 at onn: sartak | 2008-06-10 20:00:42 -0400
Don't let users create tickets in (usually cached) disabled queues. rt3.fsck.com #9620. Patch by Ian Norton.
Modified: rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm Tue Jun 10 20:01:32 2008
@@ -285,6 +285,11 @@
return ( 0, 0, $self->loc('Could not create ticket. Queue not set') );
}
+ if ( $QueueObj->Disabled ) {
+ $RT::Logger->debug("$self Disabled queue '".$QueueObj->Name."' given for ticket creation.");
+ return ( 0, 0, $self->loc('Could not create ticket in disabled queue "[_1]"', $QueueObj->Name) );
+ }
+
#Now that we have a queue, Check the ACLS
unless (
$self->CurrentUser->HasRight(
Modified: rt/branches/3.8-TESTING/share/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Ticket/Create.html (original)
+++ rt/branches/3.8-TESTING/share/html/Ticket/Create.html Tue Jun 10 20:01:32 2008
@@ -327,6 +327,8 @@
$m->callback( QueueObj => $QueueObj, ARGSRef => \%ARGS );
+$QueueObj->Disabled && Abort(loc("Cannot create tickets in a disabled queue."));
+
my $CFs = $QueueObj->TicketCustomFields();
my $TxnCFs = $QueueObj->TicketTransactionCustomFields();
More information about the Rt-commit
mailing list