Skip to content

Commit

Permalink
fix showing locked account message
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Jun 7, 2024
1 parent 8eec3ee commit 1d6c489
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Thruk/Action/AddDefaults.pm
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ sub begin {
} else {
if(!$c->authenticate(skip_db_access => 1)) {
_debug("user authentication failed") if Thruk::Base->verbose;
return $c->detach_error({msg => $c->config->{'locked_message'}, code => 403, log => 0}) if $c->stash->{'user_is_locked'};
return $c->detach('/error/index/10');
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/Thruk/Context.pm
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ sub authenticate {
if($user->{'settings'}->{'login'} && $user->{'settings'}->{'login'}->{'locked'}) {
_debug(sprintf("user account '%s' is locked", $user->{'username'})) if Thruk::Base->verbose;
$c->error($c->config->{'locked_message'});
$c->stash->{'user_is_locked'} = 1;
return;
}
}
Expand Down

0 comments on commit 1d6c489

Please sign in to comment.