This commit is contained in:
@@ -56,7 +56,8 @@ export function processLogin(authResponse, loggedInWithKnownPassword) {
|
|||||||
roles: authResponse.roles,
|
roles: authResponse.roles,
|
||||||
userType: authResponse.usertype,
|
userType: authResponse.usertype,
|
||||||
dlt: authResponse.dlt,
|
dlt: authResponse.dlt,
|
||||||
tfaEnabled: authResponse.tfa
|
tfaEnabled: authResponse.tfa,
|
||||||
|
customerRights: authResponse.customerRights
|
||||||
});
|
});
|
||||||
//log the login
|
//log the login
|
||||||
window.$gz.store.commit(
|
window.$gz.store.commit(
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export default new Vuex.Store({
|
|||||||
apiToken: "-",
|
apiToken: "-",
|
||||||
downloadToken: "-",
|
downloadToken: "-",
|
||||||
tfaEnabled: undefined,
|
tfaEnabled: undefined,
|
||||||
|
customerRights: {},
|
||||||
userId: 0,
|
userId: 0,
|
||||||
userName: "NOT AUTHENTICATED",
|
userName: "NOT AUTHENTICATED",
|
||||||
roles: 0,
|
roles: 0,
|
||||||
@@ -70,12 +71,16 @@ export default new Vuex.Store({
|
|||||||
state.userType = data.userType;
|
state.userType = data.userType;
|
||||||
state.downloadToken = data.dlt;
|
state.downloadToken = data.dlt;
|
||||||
state.tfaEnabled = data.tfaEnabled;
|
state.tfaEnabled = data.tfaEnabled;
|
||||||
|
if (data.customerRights) {
|
||||||
|
state.customerRights = data.customerRights;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
logout(state) {
|
logout(state) {
|
||||||
//Things that are reset on logout
|
//Things that are reset on logout
|
||||||
state.apiToken = "-";
|
state.apiToken = "-";
|
||||||
state.downloadToken = "-";
|
state.downloadToken = "-";
|
||||||
state.tfaEnabled = undefined;
|
state.tfaEnabled = undefined;
|
||||||
|
state.customerRights = {};
|
||||||
state.authenticated = false;
|
state.authenticated = false;
|
||||||
state.userId = 0;
|
state.userId = 0;
|
||||||
state.userName = "NOT AUTHENTICATED";
|
state.userName = "NOT AUTHENTICATED";
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<UnderConstruction data-cy="underconstruction" />
|
<div>
|
||||||
|
{{ $store.state.customerRights }}
|
||||||
|
<UnderConstruction data-cy="underconstruction" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user