summaryrefslogtreecommitdiff
path: root/rt/lib/RT/System.pm
diff options
context:
space:
mode:
authormark <mark>2011-01-01 00:47:01 +0000
committermark <mark>2011-01-01 00:47:01 +0000
commitc587b5fdc7175c2a752558efccfc3f424cff6c0d (patch)
treef065f2c68393c0300af30b0d5d1889ee7134756f /rt/lib/RT/System.pm
parent0bebde603df97eb496150e80a58755b2f792f64a (diff)
limit ticket creation queue dropdowns based on ACL, RT#7778
Diffstat (limited to 'rt/lib/RT/System.pm')
-rw-r--r--rt/lib/RT/System.pm22
1 files changed, 22 insertions, 0 deletions
diff --git a/rt/lib/RT/System.pm b/rt/lib/RT/System.pm
index 2a23e32e4..e61e35f27 100644
--- a/rt/lib/RT/System.pm
+++ b/rt/lib/RT/System.pm
@@ -189,6 +189,28 @@ sub SubjectTag {
return grep !$seen{lc $_}++, values %$map;
}
+=head2 QueueCacheNeedsUpdate ( 1 )
+
+Attribute to decide when SelectQueue needs to flush the list of queues
+ and retrieve new ones. Set when queues are created, enabled/disabled
+ and on certain acl changes. Should also better understand group management.
+
+If passed a true value, will update the attribute to be the current time.
+
+=cut
+
+sub QueueCacheNeedsUpdate {
+ my $self = shift;
+ my $update = shift;
+
+ if ($update) {
+ return $self->SetAttribute(Name => 'QueueCacheNeedsUpdate', Content => time);
+ } else {
+ my $cache = $self->FirstAttribute('QueueCacheNeedsUpdate');
+ return (defined $cache ? $cache->Content : 0 );
+ }
+}
+
eval "require RT::System_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/System_Vendor.pm});
eval "require RT::System_Local";