Class UsersController


  • @Controller
    @RequestMapping("/users")
    public class UsersController
    extends java.lang.Object
    Controller for all User related views
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLoggedInUserPage​(java.security.Principal principal)
      Get the currently logged in user's page
      java.lang.String getUserDetailsPage​(java.lang.Long userId)
      Request for a specific user details page.
      java.lang.String getUsersPage()
      Request for the page to display a list of all projects available to the currently logged in user.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UsersController

        @Autowired
        public UsersController​(UserService userService)
    • Method Detail

      • getUsersPage

        @RequestMapping
        @PreAuthorize("hasAnyRole(\'ROLE_ADMIN\', \'ROLE_MANAGER\')")
        public java.lang.String getUsersPage()
        Request for the page to display a list of all projects available to the currently logged in user.
        Returns:
        The name of the page.
      • getUserDetailsPage

        @RequestMapping({"/{userId}","/{userId}/*"})
        @PreAuthorize("hasAnyRole(\'ROLE_ADMIN\') or principal.id == #userId")
        public java.lang.String getUserDetailsPage​(@PathVariable
                                                   java.lang.Long userId)
        Request for a specific user details page.
        Parameters:
        userId - identifier for the user
        Returns:
        The name of the user account page
      • getLoggedInUserPage

        @RequestMapping("/current")
        public java.lang.String getLoggedInUserPage​(java.security.Principal principal)
        Get the currently logged in user's page
        Parameters:
        principal - a reference to the logged in user.
        Returns:
        getUserSpecificPage for the currently logged in user