[Rt-commit] rtir branch, 5.0-trunk, updated. 5.0.0-23-g63480571
? sunnavy
sunnavy at bestpractical.com
Fri Jan 8 12:34:06 EST 2021
The branch, 5.0-trunk has been updated
via 634805716b3572af8f16690b608c0843af8c1952 (commit)
via 20f7a31f812acb863507d48931d4d2b80a916810 (commit)
from 43a847b8f564847d079b50954de702452b5bc7ca (commit)
Summary of changes:
lib/RT/IR/Config.pm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
- Log -----------------------------------------------------------------
commit 20f7a31f812acb863507d48931d4d2b80a916810
Author: craig kaiser <craig at bestpractical.com>
Date: Mon Jan 4 09:01:50 2021 -0500
Remove countermeasure queues from %LinkedQueuePortlets when disabled
diff --git a/lib/RT/IR/Config.pm b/lib/RT/IR/Config.pm
index 5047499a..3b08b484 100644
--- a/lib/RT/IR/Config.pm
+++ b/lib/RT/IR/Config.pm
@@ -124,6 +124,35 @@ sub Init {
RT->Config->Set(HomepageComponents => \@homepage_components);
+ if ( RT::Config->Get('RTIR_DisableCountermeasures') ) {
+ my $orig_check = $RT::Config::META{'LinkedQueuePortlets'}{'PostLoadCheck'};
+
+ $RT::Config::META{'LinkedQueuePortlets'}{'PostLoadCheck'} = sub {
+ $orig_check->(@_) if $orig_check;
+ my $LinkedQueuePortlets = RT->Config->Get('LinkedQueuePortlets') || {};
+
+ my $queue_obj = RT::Queue->new( RT->SystemUser );
+ foreach my $queue ( keys %{$LinkedQueuePortlets} ) {
+ my $linked_queues = $LinkedQueuePortlets->{$queue};
+
+ my @queues;
+ foreach my $linked_queue ( @{$linked_queues} ) {
+ my ($queue_name) = keys %{$linked_queue};
+
+ my ( $ret, $msg ) = $queue_obj->Load($queue_name);
+ unless ($ret) {
+ RT::Logger->error("Could not load queue $queue_name from \%LinkedQueuePortlets hash: $msg");
+ next;
+ }
+
+ next if $queue_obj->Lifecycle eq RT::IR->lifecycle_countermeasure;
+ push @queues, $linked_queue;
+ }
+ $LinkedQueuePortlets->{$queue} = \@queues;
+ }
+ };
+ }
+
return;
}
commit 634805716b3572af8f16690b608c0843af8c1952
Merge: 43a847b8 20f7a31f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Jan 9 01:32:10 2021 +0800
Merge branch '5.0/fix-disablecountermeasures-config-option' into 5.0-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list