[Rt-commit] rt branch, 4.0/quicksearch-prefs-callback, created. rt-4.0.10-58-g97ee6ca
Thomas Sibley
trs at bestpractical.com
Wed Feb 27 20:30:36 EST 2013
The branch, 4.0/quicksearch-prefs-callback has been created
at 97ee6ca5811e9b68c5c7a3a52b24677a301bf78b (commit)
- Log -----------------------------------------------------------------
commit 97ee6ca5811e9b68c5c7a3a52b24677a301bf78b
Author: Thomas Sibley <trs at bestpractical.com>
Date: Wed Feb 27 17:19:22 2013 -0800
Add a callback for modifying the displayed queues on the quicksearch prefs
This also lets the callback skip the ShowTicket rights check or specify
a different right.
diff --git a/share/html/Prefs/Quicksearch.html b/share/html/Prefs/Quicksearch.html
index 02b88ab..93b026f 100644
--- a/share/html/Prefs/Quicksearch.html
+++ b/share/html/Prefs/Quicksearch.html
@@ -71,7 +71,16 @@ my $user = $session{'CurrentUser'}->UserObj;
my $unwanted = $user->Preferences('QuickSearch', {});
my $Queues = RT::Queues->new($session{'CurrentUser'});
$Queues->UnLimit;
-my @queues = grep {$_->CurrentUserHasRight('ShowTicket')} @{$Queues->ItemsArrayRef};
+
+my $right = 'ShowTicket';
+$m->callback(
+ CallbackName => 'ModifyQueues',
+ Queues => \$Queues,
+ Right => \$right,
+ Unwanted => $unwanted,
+);
+
+my @queues = grep { $right ? $_->CurrentUserHasRight($right) : 1 } @{$Queues->ItemsArrayRef};
if ($ARGS{'Save'}) {
for my $queue (@queues) {
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list