diff options
author | Vitaly Takmazov | 2019-04-26 16:40:58 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2019-04-26 16:40:58 +0300 |
commit | a34350b62784d4332243ba40ffe928afd91f67d3 (patch) | |
tree | 55923327b759122d784ca1443337e94e337e095a /src/main/java/com/juick/server/api/PM.java | |
parent | b3a514931460eb495538cdc49902bc083c5c147d (diff) |
Authorization checks are in spring-security for a while
Diffstat (limited to 'src/main/java/com/juick/server/api/PM.java')
-rw-r--r-- | src/main/java/com/juick/server/api/PM.java | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/main/java/com/juick/server/api/PM.java b/src/main/java/com/juick/server/api/PM.java index e61fef6e..06dc9733 100644 --- a/src/main/java/com/juick/server/api/PM.java +++ b/src/main/java/com/juick/server/api/PM.java @@ -56,9 +56,6 @@ public class PM { public List<com.juick.Message> doGetPM( @RequestParam(required = false) String uname) { User visitor = UserUtils.getCurrentUser(); - if (visitor.isAnonymous()) { - throw new HttpForbiddenException(); - } int uid = 0; if (uname != null && uname.matches("^[a-zA-Z0-9\\-]{2,16}$")) { uid = userService.getUIDbyName(uname); @@ -78,9 +75,6 @@ public class PM { @RequestParam String uname, @RequestParam String body) { User visitor = UserUtils.getCurrentUser(); - if (visitor.isAnonymous()) { - throw new HttpForbiddenException(); - } User userTo = AnonymousUser.INSTANCE; if (WebUtils.isUserName(uname)) { userTo = userService.getUserByName(uname); @@ -110,9 +104,6 @@ public class PM { public PrivateChats doGetGroupsPMs( @RequestParam(defaultValue = "5") int cnt) { User visitor = UserUtils.getCurrentUser(); - if (visitor.isAnonymous()) { - throw new HttpForbiddenException(); - } // TODO: ignore cnt param for now but make sure paging param will not be cnt List<Chat> lastconv = pmQueriesService.getLastChats(visitor); |