summaryrefslogtreecommitdiff
path: root/src/store/modules/Authentication/AuthenticanStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/modules/Authentication/AuthenticanStore.js')
-rw-r--r--src/store/modules/Authentication/AuthenticanStore.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/store/modules/Authentication/AuthenticanStore.js b/src/store/modules/Authentication/AuthenticanStore.js
index 0dca1832..57270159 100644
--- a/src/store/modules/Authentication/AuthenticanStore.js
+++ b/src/store/modules/Authentication/AuthenticanStore.js
@@ -61,10 +61,13 @@ const AuthenticationStore = {
.then(() => router.push('/login'))
.catch((error) => console.log(error));
},
- getUserInfo(_, username) {
+ getUserInfo({ commit }, username) {
return api
.get(`/redfish/v1/AccountService/Accounts/${username}`)
- .then(({ data }) => data)
+ .then(({ data }) => {
+ commit('global/setPrivilege', data.RoleId, { root: true });
+ return data;
+ })
.catch((error) => console.log(error));
},
resetStoreState({ state }) {