aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/api/PM.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-26 16:40:58 +0300
committerGravatar Vitaly Takmazov2019-04-26 16:40:58 +0300
commita34350b62784d4332243ba40ffe928afd91f67d3 (patch)
tree55923327b759122d784ca1443337e94e337e095a /src/main/java/com/juick/server/api/PM.java
parentb3a514931460eb495538cdc49902bc083c5c147d (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.java9
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);