From 723666143d4794d514fcc384a752921894d25a0d Mon Sep 17 00:00:00 2001 From: Andrew Block Date: Thu, 14 Jan 2021 22:26:21 -0600 Subject: [PATCH] Resolved issue with ManagementController.java --- .../redhat/sso/ninja/ManagementController.java | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/main/java/com/redhat/sso/ninja/ManagementController.java b/src/main/java/com/redhat/sso/ninja/ManagementController.java index 40d976c..144da3d 100644 --- a/src/main/java/com/redhat/sso/ninja/ManagementController.java +++ b/src/main/java/com/redhat/sso/ninja/ManagementController.java @@ -309,24 +309,6 @@ public Response databaseSave(@Context HttpServletRequest request,@Context HttpSe return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Database2.get())).build(); } - // Admin UI to be able to update a single user field - @PUT - @Path("/users/{user}") - public Response updateUserProperty(@Context HttpServletRequest request, @PathParam("user") String user) throws JsonGenerationException, JsonMappingException, IOException{ - - Map values=Json.newObjectMapper(true).readValue(IOUtils2.toStringAndClose(request.getInputStream()), new TypeReference>() {}); - Database2 db=Database2.get(); - Map userInfo=db.getUsers().get(user); - for (Entry e:values.entrySet()){ - String existingValue=userInfo.get(e.getKey()); -// System.out.println((existingValue!=null?"changing existing ":"adding new ")+"value "+e.getKey()+"->"+e.getValue()); - userInfo.put(e.getKey(), e.getValue()); - } - db.save(); - - return Response.status(200).build(); - } - // Admin UI to be able to update a single user field @PUT