Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Authentication auth = SecurityContextHolder.getContext().getAuthentication();
- auth.getName() <- wyciaga username aktualnie zalogowanego usera
- wiec można tak
- User user = userService.findByUsername(auth.getName());
- model.addAttribute("user", user);
- to wszystko w kontrolerze ^^
- a w widoku juz zadziala th:if="${offerTaked.costam.username == user.username}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement