fixes for user permissions (#892)

This commit is contained in:
Anthony Stirling
2024-03-09 14:03:46 +00:00
committed by GitHub
parent 82c4e9cf41
commit 121af0501a
12 changed files with 163 additions and 152 deletions

View File

@@ -66,10 +66,11 @@ public class SecurityConfiguration {
sessionManagement ->
sessionManagement
.sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED)
.maximumSessions(3)
.maxSessionsPreventsLogin(true)
.maximumSessions(10)
.maxSessionsPreventsLogin(false)
.sessionRegistry(sessionRegistry())
.expiredUrl("/login?logout=true"));
http.formLogin(
formLogin ->
formLogin
@@ -92,8 +93,7 @@ public class SecurityConfiguration {
.addLogoutHandler(
(request, response, authentication) -> {
HttpSession session =
request.getSession(
false);
request.getSession(false);
if (session != null) {
String sessionId = session.getId();
sessionRegistry()