[Rt-commit] r18357 - rt/3.8/trunk/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Thu Feb 12 18:41:06 EST 2009
Author: ruz
Date: Thu Feb 12 18:41:06 2009
New Revision: 18357
Modified:
rt/3.8/trunk/lib/RT/Principal_Overlay.pm
Log:
* LoadByValues returns detailed message on errors
Modified: rt/3.8/trunk/lib/RT/Principal_Overlay.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Principal_Overlay.pm (original)
+++ rt/3.8/trunk/lib/RT/Principal_Overlay.pm Thu Feb 12 18:41:06 2009
@@ -195,7 +195,7 @@
my $self = shift;
my %args = (
- Right => undef,
+ Right => undef,
Object => undef,
@_
);
@@ -208,17 +208,14 @@
my $type = $self->_GetPrincipalTypeForACL();
my $ace = RT::ACE->new( $self->CurrentUser );
- $ace->LoadByValues(
+ my ($status, $msg) = $ace->LoadByValues(
RightName => $args{'Right'},
- Object => $args{'Object'},
+ Object => $args{'Object'},
PrincipalType => $type,
PrincipalId => $self->Id
);
-
- unless ( $ace->Id ) {
- return ( 0, $self->loc("ACE not found") );
- }
- return ( $ace->Delete );
+ return ($status, $msg) unless $status;
+ return $ace->Delete;
}
# }}}
More information about the Rt-commit
mailing list