redirect student on login
This commit is contained in:
parent
126571f9f4
commit
63d13e1d88
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -79,7 +79,8 @@ export default {
|
||||||
state.isAdmin = true
|
state.isAdmin = true
|
||||||
}
|
}
|
||||||
// check if has access to search
|
// 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')
|
// console.log('is admin')
|
||||||
state.canSearch = true
|
state.canSearch = true
|
||||||
state.isAdherent = true
|
state.isAdherent = true
|
||||||
|
@ -178,7 +179,7 @@ export default {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
commit('setToken', response.data)
|
commit('setToken', response.data)
|
||||||
dispatch('getUser').then(userdata => {
|
dispatch('getUser').then(userdata => {
|
||||||
console.log('User Loggedin')
|
console.log('User Loggedin', state.isAdmin, state.isAdherent)
|
||||||
if (state.isAdmin) {
|
if (state.isAdmin) {
|
||||||
window.location.reload(true)
|
window.location.reload(true)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue