[Rt-commit] rt branch, 4.0/owner-autocomplete-skip-invalid-objects, created. rt-4.0.0rc6-8-g2f8366e
Thomas Sibley
trs at bestpractical.com
Fri Mar 4 10:22:44 EST 2011
The branch, 4.0/owner-autocomplete-skip-invalid-objects has been created
at 2f8366e3bcafbcd3c3fd8bf0f95cfff0059273f0 (commit)
- Log -----------------------------------------------------------------
commit 2f8366e3bcafbcd3c3fd8bf0f95cfff0059273f0
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Mar 1 14:09:17 2011 -0500
Skip object specs if they're not an RT::Ticket or RT::Queue
Otherwise we let crafty users load up random objects (and check who has
OwnTicket on them) using the owners autocomplete helper.
diff --git a/share/html/Helpers/Autocomplete/Owners b/share/html/Helpers/Autocomplete/Owners
index 8862f68..766c520 100644
--- a/share/html/Helpers/Autocomplete/Owners
+++ b/share/html/Helpers/Autocomplete/Owners
@@ -76,6 +76,8 @@ my $isSU = $session{CurrentUser}
# Turn RT::Ticket-1|RT::Queue-2 into ['RT::Ticket', 1], ['RT::Queue', 2]
foreach my $spec (map { [split /\-/, $_, 2] } split /\|/, $limit) {
+ next unless $spec->[0] =~ /^RT::(Ticket|Queue)$/;
+
my $object = $spec->[0]->new( $session{'CurrentUser'} );
if ( $spec->[1] ) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list