[Rt-commit] [svn] r1828 - in rt/branches/PLATANO-EXPERIMENTAL-CSS:
. lib/RT
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Thu Nov 11 03:29:19 EST 2004
Author: jesse
Date: Thu Nov 11 03:29:18 2004
New Revision: 1828
Modified:
rt/branches/PLATANO-EXPERIMENTAL-CSS/ (props changed)
rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/ACL_Overlay.pm
Log:
r9090 at tinbook: jesse | 2004-11-11T02:59:50.183743Z
r6091 at tinbook: jesse | 2004-10-23T21:46:04.315427Z
Better checking for ACL queries on undefined objects (to avoid a warning).
Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/ACL_Overlay.pm
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/ACL_Overlay.pm (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/lib/RT/ACL_Overlay.pm Thu Nov 11 03:29:18 2004
@@ -86,12 +86,27 @@
sub LimitToObject {
my $self = shift;
- my $obj = shift;
- unless (defined($obj) && ref($obj) && UNIVERSAL::can($obj, 'id')) {
- return undef;
+ my $obj = shift;
+ unless ( defined($obj)
+ && ref($obj)
+ && UNIVERSAL::can( $obj, 'id' )
+ && $obj->id )
+ {
+ return undef;
}
- $self->Limit(FIELD => 'ObjectType', OPERATOR=> '=', VALUE => ref($obj), ENTRYAGGREGATOR => 'OR');
- $self->Limit(FIELD => 'ObjectId', OPERATOR=> '=', VALUE => $obj->id, ENTRYAGGREGATOR => 'OR', QUOTEVALUE => 0);
+ $self->Limit(
+ FIELD => 'ObjectType',
+ OPERATOR => '=',
+ VALUE => ref($obj),
+ ENTRYAGGREGATOR => 'OR'
+ );
+ $self->Limit(
+ FIELD => 'ObjectId',
+ OPERATOR => '=',
+ VALUE => $obj->id,
+ ENTRYAGGREGATOR => 'OR',
+ QUOTEVALUE => 0
+ );
}
More information about the Rt-commit
mailing list