08035a93 by Adam Heath

Set sessionId at the same time as isLoggedIn.

1 parent 134d45a2
......@@ -179,13 +179,15 @@ define(function(require) {
function applyLoginResults(resultData) {
var userData = resultData.user;
var user = self.get('user');
self.set('isLoggedIn', !!userData);
self.set({
isLoggedIn: !!userData,
sessionId: resultData.sessionId,
});
if (userData) {
user.set(userData);
} else {
user.clear();
}
self.set('sessionId', resultData.sessionId);
var permissions = self.get('permissions');
var toErase = {}, toSet = {};
_.each(permissions.keys(), function(key) {
......