Add llngUserAttributes tools
The idea is to have a sort of ldapsearch
but based on portal "getUser+macros+groups". Maybe something like:
#!/usr/bin/perl
use strict;
use JSON;
use Lemonldap::NG::Portal;
my $p = Lemonldap::NG::Portal->new;
$p->init({logLevel => 'warn'});
my $uid = $ARGV[0] or die 'Missing uid';
my $req = Lemonldap::NG::Portal::Main::Request->new( {
REQUEST_URI => '/',
REMOTE_ADDR => '127.0.0.1',
PATH_INFO => '/',
}
);
$req->user($uid);
$req->steps( [
'getUser', @{ $p->betweenAuthAndData },
'setSessionInfo', $p->groupsAndMacros,
'setLocalGroups',
]
);
$p->process($req);
print JSON->new->canonical->pretty->encode($req->sessionInfo);
What do you think ?