[Rt-commit] rt branch, 4.0/get-rid-of-loop-in-validator, created. rt-4.0.6-245-gbe816ec

Ruslan Zakirov ruz at bestpractical.com
Wed Jul 11 06:44:24 EDT 2012


The branch, 4.0/get-rid-of-loop-in-validator has been created
        at  be816ecfad9e52e9697759e0c5089557a0ed9ac3 (commit)

- Log -----------------------------------------------------------------
commit be816ecfad9e52e9697759e0c5089557a0ed9ac3
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Jul 11 13:40:54 2012 +0300

    Disabled must be defined when we insert CGM record
    
    $group->Disabled returns undef in case group record has no
    Principal record. In such cases validator inserts principal
    back, but probably order of execution is wrong. This
    at least prevent infinite execution of validator.

diff --git a/sbin/rt-validator.in b/sbin/rt-validator.in
index 331d5f3..2b539b1 100644
--- a/sbin/rt-validator.in
+++ b/sbin/rt-validator.in
@@ -475,7 +475,7 @@ push @CHECKS, 'CGM vs. GM' => sub {
             my $cgm = create_record( 'CachedGroupMembers',
                 GroupId => $id, MemberId => $id,
                 ImmediateParentId => $id, Via => undef,
-                Disabled => $g->Disabled,
+                Disabled => $g->Disabled || 0,
             );
             update_records( "CachedGroupMembers", { id => $cgm }, { Via => $cgm } );
         },

-----------------------------------------------------------------------


More information about the Rt-commit mailing list