Debian Codegraph @

lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli/Lib.pm

raw
1 package Lemonldap::NG::Manager::Cli::Lib;
2
3 use strict;
4 use Mouse;
5 use Lemonldap::NG::Manager;
6
7 our $VERSION = '2.21.0';
8
9 extends 'Lemonldap::NG::Common::PSGI::Cli::Lib';
10
11 has mgr => ( is => 'ro', isa => 'Lemonldap::NG::Manager' );
12
13 has app => (
14 is => 'ro',
15 isa => 'CodeRef',
16 builder => sub {
17 my $args = {
18 protection => 'none',
19 enabledModules => "conf, sessions, notifications, 2ndFA, api"
20 };
21 $args->{configStorage} = { confFile => $_[0]->{iniFile} }
22 if ( $_[0]->{iniFile} );
23 $_[0]->{mgr} = Lemonldap::NG::Manager->new($args);
24 $_[0]->{mgr}->init($args);
25 return $_[0]->{mgr}->run();
26 }
27 );
28
29 1;