Browse Source

redirect student on login

bach 3 years ago
parent
commit
63d13e1d88

File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


BIN
web/themes/custom/materiotheme/assets/dist/main.js.gz


File diff suppressed because it is too large
+ 1 - 1
web/themes/custom/materiotheme/assets/dist/report.html


+ 3 - 2
web/themes/custom/materiotheme/vuejs/store/modules/user.js

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

Some files were not shown because too many files changed in this diff