Skip to content

Commit

Permalink
Add user status checking for GitHub flow
Browse files Browse the repository at this point in the history
  • Loading branch information
raikbitters committed Dec 4, 2024
1 parent b0b801a commit 2ccad59
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ private ReportPortalUser acquireUser(Authentication authentication) {
ErrorType.USER_NOT_FOUND, rpAuth.getPrincipal()
));
} else {
if (!((ReportPortalUser) authentication.getPrincipal()).isEnabled()) {
SecurityContextHolder.clearContext();
throw new LockedException("User account is locked");
}
return (ReportPortalUser) authentication.getPrincipal();
}
}
Expand Down

0 comments on commit 2ccad59

Please sign in to comment.