code: @POST
    @Path("{id}")
    @RolesAllowed({"ROLE_ADMIN"})
    public Response update(@PathParam("id") Long id,
                           @Context UriInfo uriInfo,
                           @Context SecurityContext securityContext,
                           DUser user) {
      checkNotNull(id);
      // Username and email will never be updated, no need to check format
  
      user = userService.update(id, user, securityContext.isUserInRole(OAuth2UserResource.ROLE_ADMIN));
  
      UriBuilder uriBuilder = uriInfo.getBaseUriBuilder()
          .path("api/users")
          .path(user.getId().toString());
  
      return Response.ok()
          .location(uriBuilder.build())
          .entity(user.getId())
          .build();
    }
docs: Update a user.
  
  @param user    user updates
  @param uriInfo injected
  @return http 200
  The URI of the updated user will be stated in the Location header