[Rt-commit] rt branch, 4.2/dont-override-system-rights, created. rt-4.1.8-262-g432fa28
Alex Vandiver
alexmv at bestpractical.com
Thu May 9 01:43:07 EDT 2013
The branch, 4.2/dont-override-system-rights has been created
at 432fa2897aa90612dd32ae0a5c56f7d2918cba9f (commit)
- Log -----------------------------------------------------------------
commit 432fa2897aa90612dd32ae0a5c56f7d2918cba9f
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu May 9 01:39:49 2013 -0400
Ensure that system rights do not move to "Status changes" category
RegisterRights checks that a right name is not a pre-existing queue
right before adding it as a new "Status" right. However, if a right
which is a system right and not a queue right (such as SuperUser) is
used to limit a transition, the category and description are overidden.
When a right name is given, ensure that it is neither a queue right nor
a system right before overriding its category and description.
diff --git a/lib/RT/Lifecycle.pm b/lib/RT/Lifecycle.pm
index 2c30a4a..7ef435c 100644
--- a/lib/RT/Lifecycle.pm
+++ b/lib/RT/Lifecycle.pm
@@ -475,7 +475,8 @@ sub RegisterRights {
my $RIGHTS = $RT::Queue::RIGHTS;
while ( my ($right, $description) = each %rights ) {
- next if exists $RIGHTS->{ $right };
+ next if exists $RIGHTS->{ $right }
+ or $RT::System::RIGHTS->{ $right };
$RIGHTS->{ $right } = $description;
RT::Queue->AddRightCategories( $right => 'Status' );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list