aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-12-16 13:25:30 +0300
committerGravatar Vitaly Takmazov2015-12-16 13:25:30 +0300
commit2def905ecd0f0182a3873da84b3d6acd302eaad9 (patch)
tree813ee78cb9ec45e00da0cfa8863b09a2e8024dce
parent922a12eac92b6b6e0367482351328eb8d5133249 (diff)
forbid banned users to comment, like and pm
m---------deps/com.juick.server10
-rw-r--r--src/main/java/com/juick/http/www/Main.java8
2 files changed, 9 insertions, 9 deletions
diff --git a/deps/com.juick.server b/deps/com.juick.server
-Subproject 79e48598873f6a2b4ec1aa850e310a689d862af
+Subproject 512d0b353f28e241937be3fa146617ba8ff97c9
diff --git a/src/main/java/com/juick/http/www/Main.java b/src/main/java/com/juick/http/www/Main.java
index 9a22c172..e6ff576a 100644
--- a/src/main/java/com/juick/http/www/Main.java
+++ b/src/main/java/com/juick/http/www/Main.java
@@ -312,28 +312,28 @@ public class Main extends HttpServlet implements Stream.StreamListener {
String uri = request.getRequestURI();
if (uri.equals("/post")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor != null) {
+ if (visitor != null && !visitor.Banned) {
pagesNewMessage.doPostMessage(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);
}
} else if (uri.equals("/comment")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor != null) {
+ if (visitor != null && !visitor.Banned) {
pagesNewMessage.doPostComment(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);
}
} else if (uri.equals("/like")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor != null) {
+ if (visitor != null && !visitor.Banned) {
pagesNewMessage.doPostRecomm(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);
}
} else if (uri.equals("/pm/send")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor != null) {
+ if (visitor != null && !visitor.Banned) {
pm.doPostPM(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);