From 3c9a0aff3ec7d14c3002c179c0180c0830c5f3bd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 23 Jan 2017 10:03:57 +0300 Subject: juick-www: hide banned blogs and threads --- juick-www/src/main/java/com/juick/www/controllers/User.java | 2 +- juick-www/src/main/java/com/juick/www/controllers/UserThread.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-www/src/main/java/com/juick/www') diff --git a/juick-www/src/main/java/com/juick/www/controllers/User.java b/juick-www/src/main/java/com/juick/www/controllers/User.java index d3406f4e..1ab7e691 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/User.java +++ b/juick-www/src/main/java/com/juick/www/controllers/User.java @@ -65,7 +65,7 @@ public class User { @PathVariable String uname) throws IOException { com.juick.User user = userService.getUserByName(uname); com.juick.User visitor = webApp.getVisitorUser(request, response); - if (visitor.isBanned()) { + if (user.isBanned()) { response.sendError(HttpServletResponse.SC_NOT_FOUND); return; } diff --git a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java index 6c2e0031..cde33a0e 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/UserThread.java +++ b/juick-www/src/main/java/com/juick/www/controllers/UserThread.java @@ -73,7 +73,7 @@ public class UserThread { com.juick.Message msg = messagesService.getMessage(mid); - if (msg == null) { + if (msg == null || msg.getUser().isBanned()) { throw new HttpNotFoundException(); } -- cgit v1.2.3