From 95bfd5295fe328cd9f020dab78f9ceb401390af3 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 16 Jun 2021 00:02:41 +0000 Subject: [PATCH] --- ayanova/src/api/authutil.js | 3 ++- ayanova/src/store.js | 5 +++++ ayanova/src/views/customer-csr.vue | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ayanova/src/api/authutil.js b/ayanova/src/api/authutil.js index 00a0a686..0132580b 100644 --- a/ayanova/src/api/authutil.js +++ b/ayanova/src/api/authutil.js @@ -56,7 +56,8 @@ export function processLogin(authResponse, loggedInWithKnownPassword) { roles: authResponse.roles, userType: authResponse.usertype, dlt: authResponse.dlt, - tfaEnabled: authResponse.tfa + tfaEnabled: authResponse.tfa, + customerRights: authResponse.customerRights }); //log the login window.$gz.store.commit( diff --git a/ayanova/src/store.js b/ayanova/src/store.js index 72ba84e8..cca6b0a1 100644 --- a/ayanova/src/store.js +++ b/ayanova/src/store.js @@ -26,6 +26,7 @@ export default new Vuex.Store({ apiToken: "-", downloadToken: "-", tfaEnabled: undefined, + customerRights: {}, userId: 0, userName: "NOT AUTHENTICATED", roles: 0, @@ -70,12 +71,16 @@ export default new Vuex.Store({ state.userType = data.userType; state.downloadToken = data.dlt; state.tfaEnabled = data.tfaEnabled; + if (data.customerRights) { + state.customerRights = data.customerRights; + } }, logout(state) { //Things that are reset on logout state.apiToken = "-"; state.downloadToken = "-"; state.tfaEnabled = undefined; + state.customerRights = {}; state.authenticated = false; state.userId = 0; state.userName = "NOT AUTHENTICATED"; diff --git a/ayanova/src/views/customer-csr.vue b/ayanova/src/views/customer-csr.vue index 3f1c1eac..3369adbc 100644 --- a/ayanova/src/views/customer-csr.vue +++ b/ayanova/src/views/customer-csr.vue @@ -1,5 +1,8 @@