A self hosted chat application with end-to-end encrypted messaging.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
798 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package org.ros.chatto.controller;
  2. import org.ros.chatto.service.UserService;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.stereotype.Controller;
  5. import org.springframework.ui.Model;
  6. import org.springframework.web.bind.annotation.GetMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import lombok.RequiredArgsConstructor;
  9. @Controller
  10. @RequestMapping("/admin")
  11. @RequiredArgsConstructor
  12. public class AdminController {
  13. @Autowired
  14. private final UserService userService;
  15. @GetMapping()
  16. public String home() {
  17. return "admin/home";
  18. }
  19. @GetMapping("/change-passphrase")
  20. public String changePassphrase(Model model) {
  21. model.addAttribute("userNames", userService.getAllRegularUsers());
  22. return "admin/change-passphrase";
  23. }
  24. }