diff options
author | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-31 16:17:26 +0300 |
---|---|---|
committer | Vitalii Lysak <v.lysak@dunice.net> | 2022-08-31 16:21:29 +0300 |
commit | 5cb3ede0b4f441c2ca6e3647bb08dee3d4286603 (patch) | |
tree | 048a1558019e202b66d4937e2999d712dcc86e0a /src/store | |
parent | 9123716b55d809bf8d1cc4727b3b10c127b405a0 (diff) | |
download | webui-vue-5cb3ede0b4f441c2ca6e3647bb08dee3d4286603.tar.xz |
SILABMC-282|283: upd rights for Operator and NoAccess rolse
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/modules/Authentication/AuthenticanStore.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/store/modules/Authentication/AuthenticanStore.js b/src/store/modules/Authentication/AuthenticanStore.js index a574331b..45aec3ee 100644 --- a/src/store/modules/Authentication/AuthenticanStore.js +++ b/src/store/modules/Authentication/AuthenticanStore.js @@ -49,18 +49,18 @@ const AuthenticationStore = { return api .post('/login', { data: [username, password] }) .then(() => { - dispatch('getUser', username) + return dispatch('getUser', username) .then((response) => { if (response.data?.RoleId) { commit('setRole', response.data.RoleId); + commit('authSuccess'); } }) .catch((error) => { + dispatch('logout'); commit('authError'); throw new Error(error); }); - - commit('authSuccess'); }) .catch((error) => { commit('authError'); |