diff options
author | 2017-01-23 10:03:57 +0300 | |
---|---|---|
committer | 2017-01-23 10:03:57 +0300 | |
commit | 3c9a0aff3ec7d14c3002c179c0180c0830c5f3bd (patch) | |
tree | 680088a9304b8282d76abddd700bfbd25e83080c /juick-www/src | |
parent | fd3b2e951400bf69ca9394d752118b6a3c039516 (diff) |
juick-www: hide banned blogs and threads
Diffstat (limited to 'juick-www/src')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/User.java | 2 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/UserThread.java | 2 |
2 files changed, 2 insertions, 2 deletions
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(); } |