[Rt-commit] rt branch, 4.2/shred-user-not-in-group, repushed

Jim Brandt jbrandt at bestpractical.com
Thu Jun 19 16:35:52 EDT 2014


The branch 4.2/shred-user-not-in-group was deleted and repushed:
       was 9443e2a1d533786314f2df2759f9dca2e607683b
       now 865ce70987f5d13cfac970bd0aba77aafba68bfb

1:  9443e2a ! 1:  865ce70 Add not_member_of option for shredding users
    @@ -87,12 +87,16 @@
     +        GroupId  => undef,
     +        @_,
     +    );
    ++
    ++    my $group = RT::Group->new(RT->SystemUser);
    ++    $group->Load($args{'GroupId'});
    ++
     +    my $users = $args{Objects};
     +    $self->FetchNext( $users, 'init' );
     +
     +    my @res;
     +    while ( my $user = $self->FetchNext( $users ) ) {
    -+        push @res, $user unless grep {$_->Id == $args{'GroupId'}} @{$user->OwnGroups->ItemsArrayRef};
    ++        push @res, $user unless $group->HasMemberRecursively($user->Id);
     +        return (1, \@res) if $self->{'opt'}{'limit'} && @res >= $self->{'opt'}{'limit'};
     +    }
     +    return (1, \@res);



More information about the rt-commit mailing list