diff --git a/web/app/controllers/Application.java b/web/app/controllers/Application.java index 816189793b..281a8440d3 100644 --- a/web/app/controllers/Application.java +++ b/web/app/controllers/Application.java @@ -193,6 +193,8 @@ public class Application extends Controller return badRequest("Missing or invalid [credentials]"); } + session().clear(); + // Create a uuid string for this session if one doesn't already exist // to be appended to the Result object String uuid = session("uuid"); @@ -207,8 +209,9 @@ public class Application extends Controller return badRequest("Invalid credentials"); } - session().clear(); + // Adds the username to the session cookie + session("user", username); // Contruct an ObjectNode with the username and uuid token to be sent with the response ObjectNode data = Json.newObject(); data.put("username", username); diff --git a/wherehows-web/app/templates/components/dataset-author.hbs b/wherehows-web/app/templates/components/dataset-author.hbs index 4946c67de4..6ad760ace2 100644 --- a/wherehows-web/app/templates/components/dataset-author.hbs +++ b/wherehows-web/app/templates/components/dataset-author.hbs @@ -2,10 +2,10 @@