diff options
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/modules/Authentication/AuthenticanStore.js | 7 |
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 }) { |