Line | |
---|
1 | package LATMOS::Accounts::Bases::OCHelper::Group; |
---|
2 | |
---|
3 | # $Id: User.pm 2932 2010-08-10 17:19:21Z nanardon $ |
---|
4 | |
---|
5 | use strict; |
---|
6 | use warnings; |
---|
7 | use base qw(LATMOS::Accounts::Bases::OCHelper); |
---|
8 | use LATMOS::Accounts::Utils; |
---|
9 | |
---|
10 | =head1 NAME |
---|
11 | |
---|
12 | LATMOS::Accounts::Bases::OCHelper::User - |
---|
13 | Helper to create group in L<LATMOS::Accounts> system |
---|
14 | |
---|
15 | =cut |
---|
16 | |
---|
17 | sub _step { |
---|
18 | my ($self, $info) = @_; |
---|
19 | if ($info->{step} <= 0) { |
---|
20 | $info->{name}{ask} = 1; |
---|
21 | push(@{$info->{ask}}, qw(description label gidNumber managedBy sutype )); |
---|
22 | $info->{step} = 1; |
---|
23 | } |
---|
24 | elsif ($info->{step} == 1) { |
---|
25 | if ($self->base->create_c_object($self->otype, |
---|
26 | $info->{name}{content}, |
---|
27 | %{$info->{contents} || {}}, |
---|
28 | )) { |
---|
29 | return 'CREATED'; |
---|
30 | } else { |
---|
31 | return 'ERROR'; |
---|
32 | } |
---|
33 | } else { |
---|
34 | return undef; |
---|
35 | } |
---|
36 | } |
---|
37 | |
---|
38 | 1; |
---|
39 | |
---|
40 | __END__ |
---|
41 | |
---|
42 | =head1 SEE ALSO |
---|
43 | |
---|
44 | L<LATMOS::Accounts::Bases::OCHelper> |
---|
45 | |
---|
46 | =head1 AUTHOR |
---|
47 | |
---|
48 | Thauvin Olivier, E<lt>olivier.thauvin@latmos.ipsl.frE<gt> |
---|
49 | |
---|
50 | =head1 COPYRIGHT AND LICENSE |
---|
51 | |
---|
52 | Copyright (C) 2012 by Thauvin Olivier |
---|
53 | |
---|
54 | This library is free software; you can redistribute it and/or modify |
---|
55 | it under the same terms as Perl itself, either Perl version 5.10.0 or, |
---|
56 | at your option, any later version of Perl 5 you may have available. |
---|
57 | |
---|
58 | =cut |
---|
Note: See
TracBrowser
for help on using the repository browser.