aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/java/com/juick/www/controllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-13 23:21:00 +0300
committerGravatar Vitaly Takmazov2016-12-13 23:21:00 +0300
commit29a503b1762bf201c5e1f4b48a447871dfc1dbb6 (patch)
treed1366ab494866a00345e1c5d19aa2ae97174db61 /juick-spring-www/src/main/java/com/juick/www/controllers
parent402b713e331c6e949005527bf9f733f5b63067f8 (diff)
juick-spring-www: fix templates logic
Diffstat (limited to 'juick-spring-www/src/main/java/com/juick/www/controllers')
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java
index 4576e9d3..ffc64221 100644
--- a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java
+++ b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java
@@ -96,6 +96,9 @@ public class IndexController {
model.addAttribute("msgs",
msgs.stream().map(msg -> {
msg.ReadOnly |= blUIDs.contains(msg.getUser().getUid());
+ if (msg.ReadOnly) {
+ msg.ReadOnly = visitor.getUid() != msg.getUser().getUid();
+ }
return msg;
}).collect(Collectors.toList())
);
@@ -109,7 +112,6 @@ public class IndexController {
}
model.addAttribute("nextpage", nextpage);
}
- //model.addAttribute("isModerator", userService.getModerators().contains(visitor.getUid()));
return "views/index";
}