Changeset 464


Ignore:
Timestamp:
10/03/09 03:25:03 (15 years ago)
Author:
nanardon
Message:
  • department field is now used to manage the real department of the user (if any), and the user can be in other department groups. At time setting departement push user into group, but it can be removed from the group, this is done on database side, I am not sure if this is not finally a feature...
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm

    r448 r464  
    3232    postalCode => [ 'Code postal' ], 
    3333    postOfficeBox => [ 'BP' ], 
    34     department => [ 'Département' ], 
     34    department => [ 'Département', 'select-N:group' ], 
    3535    streetAddress => [ 'Rue', 'textarea' ], 
    3636    title => [ 'Fonction' ], 
  • LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r441 r464  
    7878        directReports => 'directReports', 
    7979        managedObjects => 'managedObjects', 
    80         department => 'department', 
    8180        otheraddress => 'otheraddress', 
    8281        mainaddress => 'mainaddress', 
     
    137136        } 
    138137        return \@res; 
    139     } elsif ($field eq 'department') { 
    140         my $sth = $self->db->prepare_cached( 
    141             q{ 
    142             select name from "group" join 
    143             group_attributes on "group".ikey = group_attributes.okey 
    144             where okey in (select okey from group_attributes_users where value = ?) 
    145             and attr = ? and value = ? 
    146             } 
    147         ); 
    148         $sth->execute($self->id, 'sutype', 'dpmt'); 
    149         my @res; 
    150         while (my $res = $sth->fetchrow_hashref) { 
    151             push(@res, $res->{name}); 
    152         } 
    153         return join(',', @res); 
    154138    } elsif ($field eq 'managedObjects') { 
    155139        my $sth = $self->db->prepare_cached( 
Note: See TracChangeset for help on using the changeset viewer.