App-LDAP
view release on metacpan or search on metacpan
lib/App/LDAP/Command/Add/User.pm view on Meta::CPAN
package App::LDAP::Command::Add::User;
use Modern::Perl;
use Moose;
with qw( App::LDAP::Role::Command
App::LDAP::Role::Bindable );
has shell => (
is => "rw",
isa => "Str",
documentation => "the login shell. default /bin/bash.",
);
has home => (
is => "rw",
isa => "Str",
documentation => 'the home directory. default /home/\$username',
);
has group => (
is => "rw",
isa => "Str",
documentation => 'the group name. default $username',
);
has base => (
is => "rw",
isa => "Str",
documentation => 'the organizational unit this user belongs to. default /etc/ldap/ldap.conf nss_base_passwd.',
);
# inetOrgPerson
has surname => (
is => "rw",
isa => "ArrayRef[Str]",
default => sub { ["NULL"] },
documentation => 'the surname. default $username',
);
has mail => (
is => "rw",
isa => "ArrayRef",
required => 1,
documentation => "the email addresses. this option can be multiple values"
);
use App::LDAP::LDIF::User;
around prepare => sub {
my $orig = shift;
my $self = shift;
$self->group($self->extra_argv->[2]) unless $self->group;
# $self->group is the same as user name if undefined
$self->$orig(@_);
};
# {{{ sub run
sub run {
( run in 0.731 second using v1.01-cache-2.11-cpan-5b529ec07f3 )