Changeset 1299 for branches


Ignore:
Timestamp:
03/23/15 14:30:59 (9 years ago)
Author:
nanardon
Message:

backport fix

Location:
branches/4.0
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • branches/4.0

  • branches/4.0/LATMOS-Accounts/bin/la-sql-log

    r1284 r1299  
    5656 
    5757foreach(@logs) { 
    58     printf("%s %s: %d / %s %s\n", 
     58    printf("%s %s: %s/%s (%d) %s\n", 
    5959        $_->{logdate}, 
    6060        $_->{username}, 
     61        $_->{otype}, 
     62        $_->{name}, 
    6163        $_->{ikey}, 
    62         $_->{name}, 
    6364        $_->{message}, 
    6465    ); 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts.pm

    r1295 r1299  
    1111use LATMOS::Accounts::Acls; 
    1212 
    13 our $VERSION = '4.0.6'; 
     13our $VERSION = '4.0.7'; 
    1414 
    1515=head1 NAME 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm

    r1294 r1299  
    447447        $data{$attribute->iname} = $cdata{$cfield}; 
    448448    } 
    449     #keys %data or return 0; # TODO: return an error ? 
    450     my $obj = $self->create_object($otype, $id, %data) or return; 
     449    $self->create_object($otype, $id, %data) or return; 
     450    my $obj = $self->get_object($otype, $id) or return; 
    451451    $obj->ReportChange('Create', 'Object created with %s', join(', ', sort keys %cdata)); 
    452452 
    453453    foreach my $attrname (keys %data) { 
    454454        my $attribute = $self->attribute($obj->type, $attrname) or next; 
     455        $attribute->monitored or next; 
     456 
    455457        $obj->ReportChange('Attributes', '%s set to %s', $attrname, 
    456458            (ref $data{$attrname} 
    457459                ? join(', ', @{ $data{$attrname} }) 
    458                 : $data{$attrname}) || '(none)') if ($attribute->{notify}); 
     460                : $data{$attrname}) || '(none)'); 
    459461    } 
    460462 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm

    r1023 r1299  
    397397} 
    398398 
     399=head2 monitored 
     400 
     401Return true if the attribute is monitored 
     402 
     403=cut 
     404 
     405sub monitored { 
     406    my ($self) = @_; 
     407 
     408    if ($self->iname ne $self->name) { 
     409        my $attr = $self->base->attribute($self->otype, $self->iname) or return; 
     410        return $attr->monitored; 
     411    } else { 
     412        return $self->{monitored} || 0; 
     413    } 
     414} 
     415 
    3994161; 
    400417 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm

    r1294 r1299  
    392392        }; 
    393393        if ($attribute->set($cdata{$cfield})) { 
    394             $updated{$cfield} = $attribute->{notify}; 
     394            $updated{$cfield} = $attribute->monitored; 
    395395        } 
    396396    } 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Aliases.pm

    r1284 r1299  
    3333                mandatory => 1, 
    3434                multiple => 1, 
    35                 notify => 1, 
     35                monitored => 1, 
    3636            }, 
    3737            finalpoint      => { ro => 1, multiple => 1 }, 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Group.pm

    r1294 r1299  
    3636            date       => { inline => 1, ro => 1 }, 
    3737            memberUID  => { 
    38                 notify => 1, 
     38                monitored => 1, 
    3939                hide => 1, 
    4040                reference => 'user', 
     
    4949            }, 
    5050            member     => { 
    51                 notify => 1, 
     51                monitored => 1, 
    5252                reference => 'user', 
    5353                multiple => 1,  
     
    6464            groupname  => { ro => 1 }, 
    6565            managedBy  => { 
    66                 notify => 1, 
     66                monitored => 1, 
    6767                reference => 'user', 
    6868                can_values => sub { 
     
    7474            }, 
    7575            managedAlsoBy  => { 
    76                 notify => 1, 
     76                monitored => 1, 
    7777                reference => 'user', 
    7878                multiple => 1, 
     
    8787            sutype => { 
    8888                reference => 'sutype', 
    89                 notify => 1, 
     89                monitored => 1, 
    9090            }, 
    9191            autoMemberFilter => { 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Nethost.pm

    r1284 r1299  
    3232            create  => { ro => 1, inline => 1, }, 
    3333            ip      => { 
    34                 notify => 1, 
     34                monitored => 1, 
    3535                multiple => 1, 
    3636                uniq => 1, 
     
    4949            }, 
    5050            macaddr => { 
    51                 notify => 1, 
     51                monitored => 1, 
    5252                multiple => 1, 
    5353                uniq => 1, 
     
    5858            }, 
    5959            cname   => { 
    60                 notify => 1, 
     60                monitored => 1, 
    6161                multiple => 1, uniq => 1, 
    6262                input => sub { lc($_[0]) }  
    6363            }, 
    6464            owner   => { 
    65                 notify => 1, 
     65                monitored => 1, 
    6666                reference => 'user', 
    6767                delayed => 1, 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Netzone.pm

    r1284 r1299  
    3434            date    => { ro => 1, inline => 1, }, 
    3535            create  => { ro => 1, inline => 1, }, 
    36             net     => { multiple => 1, notify => 1, }, 
    37             netExclude => { multiple => 1, notify => 1, }, 
     36            net     => { multiple => 1, monitored => 1, }, 
     37            netExclude => { multiple => 1, monitored => 1, }, 
    3838            group   => { hide => 1 }, 
    3939            allow_dyn => { 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r1294 r1299  
    5151                mandatory => 1, 
    5252                formopts => { length => 7 }, 
    53                 notify => 1, 
    54             }, 
    55             uidnumber => { inline => 1, hide => 1, }, 
     53            }, 
     54            uidnumber => { inline => 1, hide => 1, monitored => 1 }, 
    5655            gidNumber => { 
    57                 notify => 1, 
    5856                inline => 1, 
    5957                iname => 'gidnumber', 
     
    8179                mandatory => 1, 
    8280                reference => 'group', 
     81                monitored => 1, 
    8382            }, 
    8483            exported  => { 
    8584                inline => 1, 
    8685                formtype => 'CHECKBOX', 
    87                 notify => 1, 
     86                monitored => 1, 
    8887            }, 
    8988            locked    => { 
    9089                formtype => 'CHECKBOX', 
    9190                formopts => { rawvalue => 1, }, 
    92                 notify => 1, 
    93             }, 
    94             expire    => { inline => 1, formtype => 'DATE', notify => 1, }, 
     91                monitored => 1, 
     92            }, 
     93            expire    => { inline => 1, formtype => 'DATE', monitored => 1, }, 
    9594            name      => { inline => 1, ro => 1, }, 
    9695            cn        => { 
     
    148147                }, 
    149148                reference => 'user', 
    150                 notify => 1, 
     149                monitored => 1, 
    151150            }, 
    152151            department => { 
     
    155154                    $base->search_objects('group', 'sutype=dpmt') 
    156155                }, 
    157                 notify => 1, 
     156                monitored => 1, 
    158157            }, 
    159158            contratType => { 
     
    162161                    $base->search_objects('group', 'sutype=contrattype') 
    163162                }, 
    164                 notify => 1, 
     163                monitored => 1, 
    165164            }, 
    166165            site => { 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm

    r1294 r1299  
    101101        } 
    102102    } 
    103     $info->{exported}   = { inline => 1, formtype => 'CHECKBOX', hide => 1, notify => 1 }; 
     103    $info->{exported}   = { inline => 1, formtype => 'CHECKBOX', hide => 1, monitored => 1 }; 
    104104    $info->{unexported} = { inline => 1, formtype => 'CHECKBOX', }; 
    105105 
  • branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Unix.pm

    r1123 r1299  
    366366    }; 
    367367    my $obj = $self->get_object($otype, $id) or return; 
    368     $obj->set_fields(%data); 
     368    $obj->set_fields(%data) or return; 
    369369    $obj 
    370370} 
Note: See TracChangeset for help on using the changeset viewer.