[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.8.8-550-g965cdb0
Shawn Moore
sartak at bestpractical.com
Tue Aug 24 19:58:41 EDT 2010
The branch, 3.9-trunk has been updated
via 965cdb0ea3c865673f5bdf0925123309d5e9d128 (commit)
via e0386f5eec8a23c1310ed70a889f22d69842aa0e (commit)
via 341fb46681e907ca4bd117a44bae48f7481527a8 (commit)
from e4d6fd51d73a1a403bafc419a721895e03863813 (commit)
Summary of changes:
lib/RT/CustomField_Overlay.pm | 4 +---
lib/RT/Group_Overlay.pm | 4 +---
lib/RT/Queue_Overlay.pm | 4 +---
lib/RT/System.pm | 5 +----
t/api/groups.t | 14 ++++----------
t/api/users.t | 14 ++++----------
6 files changed, 12 insertions(+), 33 deletions(-)
- Log -----------------------------------------------------------------
commit 341fb46681e907ca4bd117a44bae48f7481527a8
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Aug 24 19:52:34 2010 -0400
Use the AddRights methods we have in these classes
diff --git a/lib/RT/CustomField_Overlay.pm b/lib/RT/CustomField_Overlay.pm
index 2f8bce7..20a174c 100755
--- a/lib/RT/CustomField_Overlay.pm
+++ b/lib/RT/CustomField_Overlay.pm
@@ -144,9 +144,7 @@ our $RIGHTS = {
# Tell RT::ACE that this sort of object can get acls granted
$RT::ACE::OBJECT_TYPES{'RT::CustomField'} = 1;
-foreach my $right ( keys %{$RIGHTS} ) {
- $RT::ACE::LOWERCASERIGHTNAMES{ lc $right } = $right;
-}
+__PACKAGE__->AddRights(%$RIGHTS);
=head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
diff --git a/lib/RT/Group_Overlay.pm b/lib/RT/Group_Overlay.pm
index 1334e92..12141f9 100755
--- a/lib/RT/Group_Overlay.pm
+++ b/lib/RT/Group_Overlay.pm
@@ -109,9 +109,7 @@ $RT::ACE::OBJECT_TYPES{'RT::Group'} = 1;
# TODO: This should be refactored out into an RT::ACLedObject or something
# stuff the rights into a hash of rights that can exist.
-foreach my $right ( keys %{$RIGHTS} ) {
- $RT::ACE::LOWERCASERIGHTNAMES{ lc $right } = $right;
-}
+__PACKAGE__->AddRights(%$RIGHTS);
=head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
diff --git a/lib/RT/Queue_Overlay.pm b/lib/RT/Queue_Overlay.pm
index 6069151..cd039e8 100755
--- a/lib/RT/Queue_Overlay.pm
+++ b/lib/RT/Queue_Overlay.pm
@@ -125,9 +125,7 @@ $RT::ACE::OBJECT_TYPES{'RT::Queue'} = 1;
# TODO: This should be refactored out into an RT::ACLedObject or something
# stuff the rights into a hash of rights that can exist.
-foreach my $right ( keys %{$RIGHTS} ) {
- $RT::ACE::LOWERCASERIGHTNAMES{ lc $right } = $right;
-}
+__PACKAGE__->AddRights(%$RIGHTS);
=head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
diff --git a/lib/RT/System.pm b/lib/RT/System.pm
index 96324b5..b5ee5c6 100755
--- a/lib/RT/System.pm
+++ b/lib/RT/System.pm
@@ -96,10 +96,7 @@ our $RIGHTS = {
# Tell RT::ACE that this sort of object can get acls granted
$RT::ACE::OBJECT_TYPES{'RT::System'} = 1;
-foreach my $right ( keys %{$RIGHTS} ) {
- $RT::ACE::LOWERCASERIGHTNAMES{ lc $right } = $right;
-}
-
+__PACKAGE__->AddRights(%$RIGHTS);
=head2 AvailableRights
commit e0386f5eec8a23c1310ed70a889f22d69842aa0e
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Aug 24 19:58:02 2010 -0400
Cleanup of t/api/groups.t, register the tested right to silence warnings
diff --git a/t/api/groups.t b/t/api/groups.t
index 995c844..9a482f5 100644
--- a/t/api/groups.t
+++ b/t/api/groups.t
@@ -1,16 +1,10 @@
-
use strict;
use warnings;
-use RT;
-use RT::Test tests => 28;
-
-
-{
+use RT::Test tests => 27;
-ok (require RT::Groups);
-
-
-}
+RT::Group->AddRights(
+ 'RTxGroupRight' => 'Just a right for testing rights',
+);
{
commit 965cdb0ea3c865673f5bdf0925123309d5e9d128
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Aug 24 20:00:29 2010 -0400
Cleanup of t/api/users.t, register the tested right to silence warnings
diff --git a/t/api/users.t b/t/api/users.t
index d1ff174..ce96e54 100644
--- a/t/api/users.t
+++ b/t/api/users.t
@@ -1,16 +1,10 @@
-
use strict;
use warnings;
-use RT;
-use RT::Test tests => 11;
-
-
-{
+use RT::Test tests => 10;
-ok(require RT::Users);
-
-
-}
+RT::System->AddRights(
+ 'RTxUserRight' => 'Just a right for testing rights',
+);
{
no warnings qw(redefine once);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list