redirect student on login

This commit is contained in:
Bachir Soussi Chiadmi 2021-08-04 23:39:15 +02:00
parent 126571f9f4
commit 63d13e1d88
4 changed files with 6 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -79,7 +79,8 @@ export default {
state.isAdmin = true
}
// check if has access to search
if (state.roles.indexOf('adherent') !== -1) {
if (state.roles.indexOf('adherent') !== -1 ||
state.roles.indexOf('student') !== -1) {
// console.log('is admin')
state.canSearch = true
state.isAdherent = true
@ -178,7 +179,7 @@ export default {
if (response.status === 200) {
commit('setToken', response.data)
dispatch('getUser').then(userdata => {
console.log('User Loggedin')
console.log('User Loggedin', state.isAdmin, state.isAdherent)
if (state.isAdmin) {
window.location.reload(true)
}