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

Alex Vandiver alexmv at bestpractical.com
Thu Jun 9 19:40:26 EDT 2011


The branch, 4.0/clean-lifecycle-rights has been updated
       via  396bd2fcbdf9958436ce7dfddfbd356145dc0710 (commit)
       via  a8f4312afe83027456d17778ddfd91db860d2a9a (commit)
      from  6edaaae72705e29a0812132d1b398f033f7c6cc0 (commit)

Summary of changes:
 etc/RT_Config.pm.in |   11 ++++++++---
 lib/RT/Lifecycle.pm |    2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit a8f4312afe83027456d17778ddfd91db860d2a9a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jun 9 19:29:43 2011 -0400

    Add back the RejectTicket example, but make it clearer that this is a new right

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 8040cbb..70a2806 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -2128,19 +2128,24 @@ above.
 =head3 Protecting status changes with rights
 
 A transition or group of transitions can be protected by a specific
-right.
-
-For example:
+right.  Additionally, you can name new right names, which will be added
+to the system to control that transition.  For example, if you wished to
+create a lesser right than ModifyTicket for rejecting tickets, you could
+write:
 
     default => {
         ...
         rights => {
             '* -> deleted'  => 'DeleteTicket',
+            '* -> rejected' => 'RejectTicket',
             '* -> *'        => 'ModifyTicket',
         },
         ...
     },
 
+This would create a new C<RejectTicket> right in the system which you
+could assign to whatever groups you choose.
+
 On the left hand side you can have the following variants:
 
     '<from> -> <to>'

commit 396bd2fcbdf9958436ce7dfddfbd356145dc0710
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Jun 9 19:30:11 2011 -0400

    Fix a copy-and-paste bug in the dispaly name of Lifecycle-generated rights

diff --git a/lib/RT/Lifecycle.pm b/lib/RT/Lifecycle.pm
index a21042d..9e57a5a 100644
--- a/lib/RT/Lifecycle.pm
+++ b/lib/RT/Lifecycle.pm
@@ -484,7 +484,7 @@ sub RightsDescription {
         }
         my $description = 'Change status'
             . ( (grep $_ eq '*', @from)? '' : ' from '. join ', ', @from )
-            . ( (grep $_ eq '*', @to  )? '' : ' to '. join ', ', @from );
+            . ( (grep $_ eq '*', @to  )? '' : ' to '. join ', ', @to );
 
         $res{ $right } = $description;
     }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list