[Rt-commit] rt branch, 4.0/remove-unimplemented-rights, created. rt-4.0.1rc1-31-g96097b5
Alex Vandiver
alexmv at bestpractical.com
Wed Jun 8 17:36:21 EDT 2011
The branch, 4.0/remove-unimplemented-rights has been created
at 96097b5f184990479c4c58f7d130746b38930c10 (commit)
- Log -----------------------------------------------------------------
commit 96097b5f184990479c4c58f7d130746b38930c10
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Jun 8 17:35:46 2011 -0400
Remove unimplemented rights which may have crept in during lifecycles
diff --git a/etc/upgrade/4.0.1/content b/etc/upgrade/4.0.1/content
index 86bf9e8..9b74ff1 100644
--- a/etc/upgrade/4.0.1/content
+++ b/etc/upgrade/4.0.1/content
@@ -60,6 +60,24 @@
$RT::Logger->warn( "Unable to delete ACE " . $ace->id . ": " . $msg );
}
}
- }
+ },
+ sub {
+ use strict;
+ $RT::Logger->debug('Removing unimplemented RejectTicket and ModifyTicketStatus rights');
+
+ my $acl = RT::ACL->new(RT->SystemUser);
+ for my $right (qw/RejectTicket ModifyTicketStatus/) {
+ $acl->Limit( FIELD => 'RightName', VALUE => $right );
+ }
+
+ while ( my $ace = $acl->Next ) {
+ my ( $ok, $msg ) = $ace->Delete();
+ $RT::Logger->debug("Removing ACE ".$ace->id." for right ".$ace->__Value('RightName'));
+
+ if ( !$ok ) {
+ $RT::Logger->warn( "Unable to delete ACE " . $ace->id . ": " . $msg );
+ }
+ }
+ },
);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list