[Rt-commit] r8934 - rt/branches/3.7-EXPERIMENTAL/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Wed Sep 5 07:50:29 EDT 2007
Author: ruz
Date: Wed Sep 5 07:50:29 2007
New Revision: 8934
Modified:
rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm
Log:
RT::Test->set_rights
* you can now pass name of system group instead of an object
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Test.pm Wed Sep 5 07:50:29 2007
@@ -314,6 +314,14 @@
foreach my $e (@list) {
my $principal = delete $e->{'Principal'};
+ unless ( ref $principal ) {
+ if ( $principal =~ /^(everyone|(?:un)?privileged)$/i ) {
+ $principal = RT::Group->new( $RT::SystemUser );
+ $principal->LoadSystemInternalGroup($1);
+ } else {
+ die "principal is not an object, but also is not name of a system group";
+ }
+ }
unless ( $principal->isa('RT::Principal') ) {
if ( $principal->can('PrincipalObj') ) {
$principal = $principal->PrincipalObj;
More information about the Rt-commit
mailing list