Skip to content

Commit 34907fa

Browse files
authored
Fixed operations menu items when opened in anothersession (#110)
1 parent 0049ea8 commit 34907fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/store/modules/GlobalStore.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const GlobalStore = {
4444
? JSON.parse(localStorage.getItem('storedUtcDisplay'))
4545
: true,
4646
username: localStorage.getItem('storedUsername'),
47-
currentUser: JSON.parse(sessionStorage.getItem('storedCurrentUser')),
47+
currentUser: JSON.parse(localStorage.getItem('storedCurrentUser')),
4848
isAuthorized: true,
4949
isServiceLoginEnabled: false,
5050
},
@@ -134,12 +134,12 @@ const GlobalStore = {
134134
{ commit, getters },
135135
username = localStorage.getItem('storedUsername')
136136
) {
137-
if (sessionStorage.getItem('storedCurrentUser')) return;
137+
if (localStorage.getItem('storedCurrentUser')) return;
138138
return api
139139
.get(`/redfish/v1/AccountService/Accounts/${username}`)
140140
.then(({ data }) => {
141141
commit('setCurrentUser', data);
142-
sessionStorage.setItem(
142+
localStorage.setItem(
143143
'storedCurrentUser',
144144
JSON.stringify(getters.currentUser)
145145
);

0 commit comments

Comments
 (0)