[Rt-commit] rt branch, rightsmatrix, updated. rt-3.8.8-678-g3628036

Thomas Sibley trs at bestpractical.com
Fri Sep 3 13:12:05 EDT 2010


The branch, rightsmatrix has been updated
       via  3628036d29ebead5505f9059af4508a14b425bd5 (commit)
      from  249edb554ec49326ebbfb4b5ad57cf5aac3e23cc (commit)

Summary of changes:
 lib/RT/CustomField_Overlay.pm |   14 ++++++++++++++
 lib/RT/Group_Overlay.pm       |   14 ++++++++++++++
 lib/RT/Queue_Overlay.pm       |   14 ++++++++++++++
 lib/RT/System.pm              |    1 +
 4 files changed, 43 insertions(+), 0 deletions(-)

- Log -----------------------------------------------------------------
commit 3628036d29ebead5505f9059af4508a14b425bd5
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Sep 3 13:13:58 2010 -0400

    Add the AddRightCategories method from RT::System to appropriate packages

diff --git a/lib/RT/CustomField_Overlay.pm b/lib/RT/CustomField_Overlay.pm
index 2cceb76..da50a41 100755
--- a/lib/RT/CustomField_Overlay.pm
+++ b/lib/RT/CustomField_Overlay.pm
@@ -181,6 +181,7 @@ our $RIGHT_CATEGORIES = {
 $RT::ACE::OBJECT_TYPES{'RT::CustomField'} = 1;
 
 __PACKAGE__->AddRights(%$RIGHTS);
+__PACKAGE__->AddRightCategories(%$RIGHT_CATEGORIES);
 
 =head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
 
@@ -213,6 +214,19 @@ sub RightCategories {
     return $RIGHT_CATEGORIES;
 }
 
+=head2 AddRightCategories C<RIGHT>, C<CATEGORY> [, ...]
+
+Adds the given right and category pairs to the list of right categories.  This
+method should be called during server startup, not at runtime.
+
+=cut
+
+sub AddRightCategories {
+    my $self = shift if ref $_[0] or $_[0] eq __PACKAGE__;
+    my %new = @_;
+    $RIGHT_CATEGORIES = { %$RIGHT_CATEGORIES, %new };
+}
+
 =head1 NAME
 
   RT::CustomField_Overlay - overlay for RT::CustomField
diff --git a/lib/RT/Group_Overlay.pm b/lib/RT/Group_Overlay.pm
index 603fd35..dc13082 100755
--- a/lib/RT/Group_Overlay.pm
+++ b/lib/RT/Group_Overlay.pm
@@ -124,6 +124,7 @@ $RT::ACE::OBJECT_TYPES{'RT::Group'} = 1;
 # stuff the rights into a hash of rights that can exist.
 
 __PACKAGE__->AddRights(%$RIGHTS);
+__PACKAGE__->AddRightCategories(%$RIGHT_CATEGORIES);
 
 =head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
 
@@ -162,6 +163,19 @@ sub RightCategories {
     return $RIGHT_CATEGORIES;
 }
 
+=head2 AddRightCategories C<RIGHT>, C<CATEGORY> [, ...]
+
+Adds the given right and category pairs to the list of right categories.  This
+method should be called during server startup, not at runtime.
+
+=cut
+
+sub AddRightCategories {
+    my $self = shift if ref $_[0] or $_[0] eq __PACKAGE__;
+    my %new = @_;
+    $RIGHT_CATEGORIES = { %$RIGHT_CATEGORIES, %new };
+}
+
 
 # {{{ sub SelfDescription
 
diff --git a/lib/RT/Queue_Overlay.pm b/lib/RT/Queue_Overlay.pm
index cf655d0..77535a2 100755
--- a/lib/RT/Queue_Overlay.pm
+++ b/lib/RT/Queue_Overlay.pm
@@ -157,6 +157,7 @@ $RT::ACE::OBJECT_TYPES{'RT::Queue'} = 1;
 # stuff the rights into a hash of rights that can exist.
 
 __PACKAGE__->AddRights(%$RIGHTS);
+__PACKAGE__->AddRightCategories(%$RIGHT_CATEGORIES);
 
 =head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
 
@@ -173,6 +174,19 @@ sub AddRights {
                                       map { lc($_) => $_ } keys %new);
 }
 
+=head2 AddRightCategories C<RIGHT>, C<CATEGORY> [, ...]
+
+Adds the given right and category pairs to the list of right categories.  This
+method should be called during server startup, not at runtime.
+
+=cut
+
+sub AddRightCategories {
+    my $self = shift if ref $_[0] or $_[0] eq __PACKAGE__;
+    my %new = @_;
+    $RIGHT_CATEGORIES = { %$RIGHT_CATEGORIES, %new };
+}
+
 sub AddLink {
     my $self = shift;
     my %args = ( Target => '',
diff --git a/lib/RT/System.pm b/lib/RT/System.pm
index 972eb42..8bee2d8 100755
--- a/lib/RT/System.pm
+++ b/lib/RT/System.pm
@@ -112,6 +112,7 @@ our $RIGHT_CATEGORIES = {
 $RT::ACE::OBJECT_TYPES{'RT::System'} = 1;
 
 __PACKAGE__->AddRights(%$RIGHTS);
+__PACKAGE__->AddRightCategories(%$RIGHT_CATEGORIES);
 
 =head2 AvailableRights
 

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


More information about the Rt-commit mailing list