Backport #1040
This commit is contained in:
parent
f1bbf4e181
commit
1cf2d8fd5c
|
@ -62,7 +62,8 @@ has REMOTE_USER => (
|
|||
is => 'rw',
|
||||
reader => 'user',
|
||||
trigger => sub {
|
||||
$_[0]->{userData} = { _whatToTrace => $_[0]->{REMOTE_USER}, };
|
||||
$_[0]->{userData} = { $Lemonldap::NG::Handler::Main::tsv->{whatTotrace}
|
||||
|| _whatToTrace => $_[0]->{REMOTE_USER}, };
|
||||
},
|
||||
);
|
||||
has userData => ( is => 'rw', isa => 'HashRef', default => sub { {} } );
|
||||
|
|
|
@ -128,14 +128,14 @@ sub _authAndTrace {
|
|||
# @return hash of user datas
|
||||
sub user {
|
||||
my ( $self, $req ) = @_;
|
||||
return $req->userData || { _whatToTrace => 'anonymous' };
|
||||
return $req->userData || { $Lemonldap::NG::Handler::Main::tsv->{whatToTrace} || _whatToTrace => 'anonymous' };
|
||||
}
|
||||
|
||||
## @method string userId()
|
||||
# @return user identifier to log
|
||||
sub userId {
|
||||
my ( $self, $req ) = @_;
|
||||
return $req->userData->{_whatToTrace} || 'anonymous';
|
||||
return $req->userData->{$Lemonldap::NG::Handler::Main::tsv->{whatToTrace} || '_whatToTrace'} || 'anonymous';
|
||||
}
|
||||
|
||||
## @method boolean group(string group)
|
||||
|
|
|
@ -119,9 +119,10 @@ sub scanTree {
|
|||
|
||||
# Set cfgNum to ref cfgNum (will be changed when saving), set other
|
||||
# metadatas and set a value to the key if empty
|
||||
$self->newConf->{cfgNum} = $self->req->params('cfgNum');
|
||||
$self->newConf->{cfgAuthor} = $self->req->userData->{_whatToTrace}
|
||||
// "anonymous";
|
||||
$self->newConf->{cfgNum} = $self->req->params('cfgNum');
|
||||
$self->newConf->{cfgAuthor} =
|
||||
$self->req->userData->{ $Lemonldap::NG::Handler::Main::tsv->{whatToTrace}
|
||||
|| '_whatToTrace' } // "anonymous";
|
||||
$self->newConf->{cfgAuthorIP} = $self->req->remote_ip;
|
||||
$self->newConf->{cfgDate} = time;
|
||||
$self->newConf->{key} ||=
|
||||
|
|
|
@ -1864,7 +1864,8 @@ sub controlExistingSession {
|
|||
# A session has been found => call existingSession
|
||||
my $r = $self->_sub( 'existingSession', $id, $self->{sessionInfo} );
|
||||
if ( $r == PE_DONE ) {
|
||||
$self->{user} = $self->{sessionInfo}->{_whatToTrace};
|
||||
$self->{user} = $self->{sessionInfo}
|
||||
->{ $self->{whatToTrace} || '_whatToTrace' };
|
||||
$self->{error} = $self->_subProcess(
|
||||
qw(checkNotification issuerDBInit authInit issuerForAuthUser authFinish autoRedirect)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue
Block a user