-#!/usr/bin/env perl
use strict;
use warnings;
{
my $with = RT::Groups->new( RT->SystemUser );
$with->WithMember( PrincipalId => $user->PrincipalObj->Id, Recursively => 1 );
- $with->Limit( FIELD => 'domain', OPERATOR => '=', VALUE => 'UserDefined' );
+ $with->LimitToUserDefinedGroups;
is_deeply(
[map {$_->Name} @{$with->ItemsArrayRef}],
['Disabled Group','Supergroup'],
my $without = RT::Groups->new( RT->SystemUser );
$without->WithoutMember( PrincipalId => $user->PrincipalObj->Id, Recursively => 1 );
- $without->Limit( FIELD => 'domain', OPERATOR => '=', VALUE => 'UserDefined' );
+ $without->LimitToUserDefinedGroups;
is_deeply(
[map {$_->Name} @{$without->ItemsArrayRef}],
[],