This commit is contained in:
2021-06-16 00:02:41 +00:00
parent 0560e15cb3
commit 95bfd5295f
3 changed files with 11 additions and 2 deletions

View File

@@ -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";