X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FAttributes.pm;h=c556756ae2ea8ae00af687e58c258fd0cabb38ef;hb=45d35d5739d05e602bc317739485693e0e9ff0b5;hp=9c18c1a0f5ef2a10594f1d5283ecaf8978718c78;hpb=662be3ece2ef8c7f05fcbfaa699d80a6a73ca110;p=freeside.git diff --git a/rt/lib/RT/Attributes.pm b/rt/lib/RT/Attributes.pm index 9c18c1a0f..c556756ae 100644 --- a/rt/lib/RT/Attributes.pm +++ b/rt/lib/RT/Attributes.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -210,7 +210,10 @@ sub LimitToObject { unless (eval { $obj->id} ){ return undef; } - $self->Limit(FIELD => 'ObjectType', OPERATOR=> '=', VALUE => ref($obj), ENTRYAGGREGATOR => 'OR'); + + my $type = $obj->isa("RT::CurrentUser") ? "RT::User" : ref($obj); + + $self->Limit(FIELD => 'ObjectType', OPERATOR=> '=', VALUE => $type, ENTRYAGGREGATOR => 'OR'); $self->Limit(FIELD => 'ObjectId', OPERATOR=> '=', VALUE => $obj->id, ENTRYAGGREGATOR => 'OR', QUOTEVALUE => 0); }