X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FUsers_Overlay.pm;h=96409251fce41b520a7ae7402ddcbb4d071da9de;hp=a0eabed8e067f6d0fcb9e212a1f567d82553905d;hb=75162bb14b3e38d66617077843f4dfdcaf09d5c4;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941 diff --git a/rt/lib/RT/Users_Overlay.pm b/rt/lib/RT/Users_Overlay.pm index a0eabed8e..96409251f 100644 --- a/rt/lib/RT/Users_Overlay.pm +++ b/rt/lib/RT/Users_Overlay.pm @@ -405,6 +405,12 @@ sub WhoHaveRoleRight ); my @objects = $self->_GetEquivObjects( %args ); + + # RT::Principal->RolesWithRight only expects EquivObjects, so we need to + # fill it. At the very least it needs $args{Object}, which + # _GetEquivObjects above does for us. + unshift @{$args{'EquivObjects'}}, @objects; + my @roles = RT::Principal->RolesWithRight( %args ); unless ( @roles ) { $self->_AddSubClause( "WhichRole", "(main.id = 0)" );