Package com.changestuffs.scrum.shared.dto

Examples of com.changestuffs.scrum.shared.dto.CurrentUserDto


    }

    private CurrentUserDto getCurrentUserDto() {
        Boolean isLoggedIn = userService.isUserLoggedIn();

        CurrentUserDto currentUser = new CurrentUserDto(isLoggedIn, getUser());
        currentUser.setLogoutUrl(userService.createLogoutURL("/"));
        currentUser.setLoginUrl(userService.createLoginURL("/"));

        if (isLoggedIn) {
            currentUser.setIsAdmin(userService.isUserAdmin());
            currentUser.setNickname(userService.getCurrentUser().getNickname());
        }

        return currentUser;
    }
View Full Code Here


    this.currentUserDtoProvider = currentUserDtoProvider;
  }

  @GET
  public Response currentUser() {
    CurrentUserDto currentUser = currentUserDtoProvider.get();

    return Response.ok(currentUser).build();
  }
View Full Code Here

TOP

Related Classes of com.changestuffs.scrum.shared.dto.CurrentUserDto

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.