DSS-6551 Fixes issue with play session cookie not containing username. Small updates to wordinng in Ownership ui

This commit is contained in:
Seyi Adebajo 2017-03-28 01:19:31 -07:00 committed by Mars Lan
parent a39558c388
commit 9e87ca6cd5
2 changed files with 6 additions and 3 deletions

View File

@ -193,6 +193,8 @@ public class Application extends Controller
return badRequest("Missing or invalid [credentials]"); return badRequest("Missing or invalid [credentials]");
} }
session().clear();
// Create a uuid string for this session if one doesn't already exist // Create a uuid string for this session if one doesn't already exist
// to be appended to the Result object // to be appended to the Result object
String uuid = session("uuid"); String uuid = session("uuid");
@ -207,8 +209,9 @@ public class Application extends Controller
return badRequest("Invalid credentials"); 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 // Contruct an ObjectNode with the username and uuid token to be sent with the response
ObjectNode data = Json.newObject(); ObjectNode data = Json.newObject();
data.put("username", username); data.put("username", username);

View File

@ -2,10 +2,10 @@
<button class="nacho-button nacho-button--large-inverse" <button class="nacho-button nacho-button--large-inverse"
title={{if requiredMinNotConfirmed title={{if requiredMinNotConfirmed
"Need at least two confirmed owners to make changes" "Need at least two confirmed owners to make changes"
"Save Changes"}} "Confirm Owners"}}
disabled={{requiredMinNotConfirmed}} disabled={{requiredMinNotConfirmed}}
{{action "updateOwners"}}> {{action "updateOwners"}}>
Save Changes Confirm Owners
</button> </button>
<button class="nacho-button nacho-button--large" <button class="nacho-button nacho-button--large"