Last change
on this file since 1904 was
1365,
checked in by nanardon, 9 years ago
|
Exchange manager and managerContact attribute to propagate manager to other bases
|
File size:
1.2 KB
|
Line | |
---|
1 | package LATMOS::Accounts::Bases::Sql::OCHelper::User; |
---|
2 | |
---|
3 | # $Id: Accreq.pm 2041 2010-04-18 13:16:39Z nanardon $ |
---|
4 | |
---|
5 | =head1 NAME |
---|
6 | |
---|
7 | LATMOS::Accounts::Bases::Sql::OCHelper::User - Helper to create accreq |
---|
8 | object |
---|
9 | |
---|
10 | =cut |
---|
11 | |
---|
12 | use strict; |
---|
13 | use warnings; |
---|
14 | use base qw(LATMOS::Accounts::Bases::OCHelper); |
---|
15 | use LATMOS::Accounts::Utils; |
---|
16 | use POSIX qw(strftime); |
---|
17 | |
---|
18 | sub _step { |
---|
19 | my ($self, $info) = @_; |
---|
20 | if ($info->{step} == 0) { |
---|
21 | $info->{step} = 1; |
---|
22 | $info->{ask} = [ |
---|
23 | qw(givenName sn managerContact department) |
---|
24 | ]; |
---|
25 | |
---|
26 | } elsif ($info->{step} == 1) { |
---|
27 | if ($self->base->create_c_object($self->otype, |
---|
28 | strftime('%Y%m%d%H%M%S', localtime), |
---|
29 | %{$info->{contents} || {}}, |
---|
30 | )) { |
---|
31 | return 'CREATED'; |
---|
32 | } else { |
---|
33 | return 'ERROR'; |
---|
34 | } |
---|
35 | } else { |
---|
36 | return undef; |
---|
37 | } |
---|
38 | } |
---|
39 | |
---|
40 | =head1 SEE ALSO |
---|
41 | |
---|
42 | L<LATMOS::Accounts> |
---|
43 | |
---|
44 | =head1 AUTHOR |
---|
45 | |
---|
46 | Olivier Thauvin, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> |
---|
47 | |
---|
48 | =head1 COPYRIGHT AND LICENSE |
---|
49 | |
---|
50 | Copyright (C) 2012 CNRS SA/CETP/LATMOS |
---|
51 | |
---|
52 | This library is free software; you can redistribute it and/or modify |
---|
53 | it under the same terms as Perl itself, either Perl version 5.10.0 or, |
---|
54 | at your option, any later version of Perl 5 you may have available. |
---|
55 | |
---|
56 | =cut |
---|
57 | |
---|
58 | 1; |
---|
Note: See
TracBrowser
for help on using the repository browser.