From 5ec9e5bff67957a796991a363b12d26698584b13 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 3 Mar 2017 10:10:23 +0300 Subject: juick-www: fix settings controller --- juick-www/src/main/java/com/juick/www/controllers/Settings.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'juick-www/src/main/java/com/juick/www/controllers') diff --git a/juick-www/src/main/java/com/juick/www/controllers/Settings.java b/juick-www/src/main/java/com/juick/www/controllers/Settings.java index 6cafbb7e..c7c51820 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/Settings.java +++ b/juick-www/src/main/java/com/juick/www/controllers/Settings.java @@ -80,6 +80,8 @@ public class Settings { EmailService emailService; @Inject TelegramService telegramService; + @Inject + MessagesService messagesService; @RequestMapping(value = "/settings", method = RequestMethod.GET) protected String doGet(HttpServletRequest request, HttpServletResponse response, ModelMap model) throws IOException { @@ -109,6 +111,7 @@ public class Settings { model.addAttribute("telegram_name", crosspostService.getTelegramName(visitor.getUid())); model.addAttribute("notify_options", subscriptionService.getNotifyOptions(visitor)); model.addAttribute("userinfo", userService.getUserInfo(visitor)); + model.addAttribute("readonly", messagesService.isReadonly()); if (page.equals("auth-email")) { if (emailService.verifyAddressByCode(visitor.getUid(), request.getParameter("code"))) { ; -- cgit v1.2.3