[Rt-commit] rt branch, 4.0/clean-lifecycle-rights, updated. rt-4.0.1rc1-15-g6edaaae

Alex Vandiver alexmv at bestpractical.com
Wed Jun 8 17:53:46 EDT 2011


The branch, 4.0/clean-lifecycle-rights has been updated
       via  6edaaae72705e29a0812132d1b398f033f7c6cc0 (commit)
      from  1af3c867110e2bd824a0f20ef0085bd0da5a8286 (commit)

Summary of changes:
 etc/upgrade/4.0.1/content |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 6edaaae72705e29a0812132d1b398f033f7c6cc0
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 8 17:35:46 2011 -0400

    Remove unimplemented rights which may have crept in

diff --git a/etc/upgrade/4.0.1/content b/etc/upgrade/4.0.1/content
index 6294ee8..f6baf12 100644
--- a/etc/upgrade/4.0.1/content
+++ b/etc/upgrade/4.0.1/content
@@ -43,5 +43,23 @@
             $group->RT::Record::Delete();
         }
     },
+    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