From d29c1b45532aab5f3b98bf3f65040d88d356861b Mon Sep 17 00:00:00 2001 From: Denis Natusch Date: Tue, 14 Nov 2023 19:08:15 +0100 Subject: [PATCH] Logout customer after deleting their account --- src/main/java/catering/users/UserController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/catering/users/UserController.java b/src/main/java/catering/users/UserController.java index ea2aca0..8fb1e56 100644 --- a/src/main/java/catering/users/UserController.java +++ b/src/main/java/catering/users/UserController.java @@ -83,7 +83,7 @@ public class UserController { @PreAuthorize("hasRole('CUSTOMER')") public String disableUser(@LoggedIn UserAccount userAccount) { userManagement.disableUserAccount(userAccount); - return "redirect:/"; + return "redirect:/logout"; } @GetMapping("/customers")