Skip to content

Commit b26c8d5

Browse files
committed
Address unauthorized call when 2FA is enabled
1 parent 17fade4 commit b26c8d5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ui/src/store/modules/user.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ const user = {
205205
},
206206
Login ({ commit }, userInfo) {
207207
return new Promise((resolve, reject) => {
208-
login(userInfo).then(async response => {
208+
login(userInfo).then(response => {
209209
const result = response.loginresponse || {}
210210
Cookies.set('account', result.account, { expires: 1 })
211211
Cookies.set('domainid', result.domainid, { expires: 1 })
@@ -247,11 +247,6 @@ const user = {
247247
const latestVersion = vueProps.$localStorage.get(LATEST_CS_VERSION, { version: '', fetchedTs: 0 })
248248
commit('SET_LATEST_VERSION', latestVersion)
249249
notification.destroy()
250-
251-
await api('listUsers', { userid: result.userid }).then(async response => {
252-
await applyCustomGuiTheme(response.listusersresponse.user[0].accountid, result.domainid)
253-
})
254-
255250
resolve()
256251
}).catch(error => {
257252
reject(error)
@@ -414,6 +409,7 @@ const user = {
414409

415410
api('listUsers', { id: Cookies.get('userid'), showicon: true }).then(response => {
416411
const result = response.listusersresponse.user[0]
412+
applyCustomGuiTheme(result.accountid, result.domainid)
417413
commit('SET_INFO', result)
418414
commit('SET_NAME', result.firstname + ' ' + result.lastname)
419415
commit('SET_AVATAR', result.icon?.base64image || '')

0 commit comments

Comments
 (0)