Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
frontend-auth
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
08035a93
authored
2016-08-05 18:55:58 -0500
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Set sessionId at the same time as isLoggedIn.
1 parent
134d45a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
src/scripts/Auth.js
src/scripts/Auth.js
View file @
08035a9
...
...
@@ -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
)
{
...
...
Please
register
or
sign in
to post a comment