use of com.fasterxml.jackson.annotation.JsonPropertyDescription in project webcert by sklintyg.
the class UserResource method getUserRoles.
@GET
@Path("/role")
@Produces(MediaType.APPLICATION_JSON)
@JsonPropertyDescription("Get the roles for user in session")
public Response getUserRoles() {
final WebCertUser user = webCertUserService.getUser();
final Map<String, Role> roles = user.getRoles();
final Set<String> roleStrings = roles.keySet();
return Response.ok(roleStrings).build();
}
Aggregations