Changeset 1299
- Timestamp:
- 03/23/15 14:30:59 (9 years ago)
- 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 56 56 57 57 foreach(@logs) { 58 printf("%s %s: % d / %s%s\n",58 printf("%s %s: %s/%s (%d) %s\n", 59 59 $_->{logdate}, 60 60 $_->{username}, 61 $_->{otype}, 62 $_->{name}, 61 63 $_->{ikey}, 62 $_->{name},63 64 $_->{message}, 64 65 ); -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts.pm
r1295 r1299 11 11 use LATMOS::Accounts::Acls; 12 12 13 our $VERSION = '4.0. 6';13 our $VERSION = '4.0.7'; 14 14 15 15 =head1 NAME -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
r1294 r1299 447 447 $data{$attribute->iname} = $cdata{$cfield}; 448 448 } 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; 451 451 $obj->ReportChange('Create', 'Object created with %s', join(', ', sort keys %cdata)); 452 452 453 453 foreach my $attrname (keys %data) { 454 454 my $attribute = $self->attribute($obj->type, $attrname) or next; 455 $attribute->monitored or next; 456 455 457 $obj->ReportChange('Attributes', '%s set to %s', $attrname, 456 458 (ref $data{$attrname} 457 459 ? join(', ', @{ $data{$attrname} }) 458 : $data{$attrname}) || '(none)') if ($attribute->{notify});460 : $data{$attrname}) || '(none)'); 459 461 } 460 462 -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Attributes.pm
r1023 r1299 397 397 } 398 398 399 =head2 monitored 400 401 Return true if the attribute is monitored 402 403 =cut 404 405 sub 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 399 416 1; 400 417 -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm
r1294 r1299 392 392 }; 393 393 if ($attribute->set($cdata{$cfield})) { 394 $updated{$cfield} = $attribute-> {notify};394 $updated{$cfield} = $attribute->monitored; 395 395 } 396 396 } -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Aliases.pm
r1284 r1299 33 33 mandatory => 1, 34 34 multiple => 1, 35 notify=> 1,35 monitored => 1, 36 36 }, 37 37 finalpoint => { ro => 1, multiple => 1 }, -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Group.pm
r1294 r1299 36 36 date => { inline => 1, ro => 1 }, 37 37 memberUID => { 38 notify=> 1,38 monitored => 1, 39 39 hide => 1, 40 40 reference => 'user', … … 49 49 }, 50 50 member => { 51 notify=> 1,51 monitored => 1, 52 52 reference => 'user', 53 53 multiple => 1, … … 64 64 groupname => { ro => 1 }, 65 65 managedBy => { 66 notify=> 1,66 monitored => 1, 67 67 reference => 'user', 68 68 can_values => sub { … … 74 74 }, 75 75 managedAlsoBy => { 76 notify=> 1,76 monitored => 1, 77 77 reference => 'user', 78 78 multiple => 1, … … 87 87 sutype => { 88 88 reference => 'sutype', 89 notify=> 1,89 monitored => 1, 90 90 }, 91 91 autoMemberFilter => { -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Nethost.pm
r1284 r1299 32 32 create => { ro => 1, inline => 1, }, 33 33 ip => { 34 notify=> 1,34 monitored => 1, 35 35 multiple => 1, 36 36 uniq => 1, … … 49 49 }, 50 50 macaddr => { 51 notify=> 1,51 monitored => 1, 52 52 multiple => 1, 53 53 uniq => 1, … … 58 58 }, 59 59 cname => { 60 notify=> 1,60 monitored => 1, 61 61 multiple => 1, uniq => 1, 62 62 input => sub { lc($_[0]) } 63 63 }, 64 64 owner => { 65 notify=> 1,65 monitored => 1, 66 66 reference => 'user', 67 67 delayed => 1, -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Netzone.pm
r1284 r1299 34 34 date => { ro => 1, inline => 1, }, 35 35 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, }, 38 38 group => { hide => 1 }, 39 39 allow_dyn => { -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm
r1294 r1299 51 51 mandatory => 1, 52 52 formopts => { length => 7 }, 53 notify => 1, 54 }, 55 uidnumber => { inline => 1, hide => 1, }, 53 }, 54 uidnumber => { inline => 1, hide => 1, monitored => 1 }, 56 55 gidNumber => { 57 notify => 1,58 56 inline => 1, 59 57 iname => 'gidnumber', … … 81 79 mandatory => 1, 82 80 reference => 'group', 81 monitored => 1, 83 82 }, 84 83 exported => { 85 84 inline => 1, 86 85 formtype => 'CHECKBOX', 87 notify=> 1,86 monitored => 1, 88 87 }, 89 88 locked => { 90 89 formtype => 'CHECKBOX', 91 90 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, }, 95 94 name => { inline => 1, ro => 1, }, 96 95 cn => { … … 148 147 }, 149 148 reference => 'user', 150 notify=> 1,149 monitored => 1, 151 150 }, 152 151 department => { … … 155 154 $base->search_objects('group', 'sutype=dpmt') 156 155 }, 157 notify=> 1,156 monitored => 1, 158 157 }, 159 158 contratType => { … … 162 161 $base->search_objects('group', 'sutype=contrattype') 163 162 }, 164 notify=> 1,163 monitored => 1, 165 164 }, 166 165 site => { -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm
r1294 r1299 101 101 } 102 102 } 103 $info->{exported} = { inline => 1, formtype => 'CHECKBOX', hide => 1, notify=> 1 };103 $info->{exported} = { inline => 1, formtype => 'CHECKBOX', hide => 1, monitored => 1 }; 104 104 $info->{unexported} = { inline => 1, formtype => 'CHECKBOX', }; 105 105 -
branches/4.0/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Unix.pm
r1123 r1299 366 366 }; 367 367 my $obj = $self->get_object($otype, $id) or return; 368 $obj->set_fields(%data) ;368 $obj->set_fields(%data) or return; 369 369 $obj 370 370 }
Note: See TracChangeset
for help on using the changeset viewer.