From 80d545ad84a6732ed09355ee65b8a65d578f6268 Mon Sep 17 00:00:00 2001 From: andrzejewsky Date: Tue, 23 Jul 2019 10:30:11 +0200 Subject: [PATCH] resolve conflicts --- core/modules/user/store/actions.ts | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/core/modules/user/store/actions.ts b/core/modules/user/store/actions.ts index 97ff9c08f3f..d0673a75695 100644 --- a/core/modules/user/store/actions.ts +++ b/core/modules/user/store/actions.ts @@ -31,13 +31,13 @@ const actions: ActionTree = { commit(types.USER_TOKEN_CHANGED, { newToken }) dispatch('sessionAfterAuthorized', {}) - if (config.usePriceTiers) { - const userData = await usersCollection.getItem('current-user') - if (userData) { - dispatch('setUserGroup', userData) - } + const userData = await usersCollection.getItem('current-user') + + if (userData) { + dispatch('setUserGroup', userData) } + } else { EventBus.$emit('session-after-nonauthorized') } @@ -94,17 +94,12 @@ const actions: ActionTree = { * @param userData */ setUserGroup ({ commit }, userData) { - if (config.usePriceTiers) { - if (userData.groupToken) { - commit(types.USER_GROUP_TOKEN_CHANGED, userData.groupToken) - } + if (userData.groupToken) { + commit(types.USER_GROUP_TOKEN_CHANGED, userData.groupToken) + } - if (userData.group_id) { - commit(types.USER_GROUP_CHANGED, userData.group_id) - } - } else { - commit(types.USER_GROUP_TOKEN_CHANGED, '') - commit(types.USER_GROUP_CHANGED, null) + if (userData.group_id) { + commit(types.USER_GROUP_CHANGED, userData.group_id) } }, async restoreCurrentUserFromCache ({ commit, dispatch }) {