From bdf6c8ff1eb67d320684df025632ebf72966db37 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 29 Aug 2018 15:15:07 +0300 Subject: hide banned user messages, not disabled --- juick-server/src/main/java/com/juick/server/api/Messages.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server') diff --git a/juick-server/src/main/java/com/juick/server/api/Messages.java b/juick-server/src/main/java/com/juick/server/api/Messages.java index 80c718b7..2b171489 100644 --- a/juick-server/src/main/java/com/juick/server/api/Messages.java +++ b/juick-server/src/main/java/com/juick/server/api/Messages.java @@ -169,8 +169,7 @@ public class Messages { if (!messagesService.canViewThread(mid, visitor.getUid())) { return FORBIDDEN; } else { - JuickUser juickUser = new JuickUser(userService.getUserByName(msg.getUser().getName())); - if (!juickUser.isEnabled()) { + if (userService.getUserByName(msg.getUser().getName()).isBanned()) { throw new HttpNotFoundException(); } msg.setRecommendations(new HashSet<>(messagesService.getMessageRecommendations(msg.getMid()))); -- cgit v1.2.3