This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<UnderConstruction data-cy="underconstruction" />
|
||||
<div>
|
||||
{{ $store.state.customerRights }}
|
||||
<UnderConstruction data-cy="underconstruction" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user