X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FPrincipal.pm;h=76582d67529eaf96b42306a9450ed55092613cb0;hb=a2df4ef9575be1ae2f1f5b9089f121316f796bac;hp=0ee03f112a08ee9866f0c6297ea38ce2d029b517;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/rt/lib/RT/Principal.pm b/rt/lib/RT/Principal.pm index 0ee03f112..76582d675 100644 --- a/rt/lib/RT/Principal.pm +++ b/rt/lib/RT/Principal.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -263,8 +263,9 @@ sub HasRight { return 1; } - $args{'Right'} = RT::ACE->CanonicalizeRightName( $args{'Right'} ); - unless ( $args{'Right'} ) { + if ( my $right = RT::ACE->CanonicalizeRightName( $args{'Right'} ) ) { + $args{'Right'} = $right; + } else { $RT::Logger->error( "Invalid right. Couldn't canonicalize right '$args{'Right'}'"); return undef;