Skip to content

Commit 3ac456a

Browse files
committed
Clean up status rights when building lifecycle cache
1 parent d137a5c commit 3ac456a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/RT/Lifecycle.pm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,14 @@ sub FillCache {
760760
}
761761
}
762762

763+
# Build status rights from scratch to ensure deleted ones are removed from cache.
764+
require RT::ACE;
765+
for my $class (qw/RT::Queue RT::Catalog/) {
766+
$RT::ACE::RIGHTS{$class} = {
767+
map { $RT::ACE::RIGHTS{$class}{$_}{Category} eq 'Status' ? () : ( $_ => $RT::ACE::RIGHTS{$class}{$_} ) }
768+
keys %{ $RT::ACE::RIGHTS{$class} }
769+
};
770+
}
763771
for my $type (keys %LIFECYCLES_TYPES) {
764772
for my $category ( qw(initial active inactive), '' ) {
765773
my %seen;

0 commit comments

Comments
 (0)