|
@@ -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)
|
|
|
}
|