X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FAttributes.pm;h=c556756ae2ea8ae00af687e58c258fd0cabb38ef;hb=45d35d5739d05e602bc317739485693e0e9ff0b5;hp=fcbd0b1b4bba129c8fc372873cfed41c6f505c1b;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/lib/RT/Attributes.pm b/rt/lib/RT/Attributes.pm index fcbd0b1b4..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-2012 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); }