Fix bug when checking user session
must have a user before can be root
This commit is contained in:
		
							parent
							
								
									1b7c029a83
								
							
						
					
					
						commit
						7f1ef1b335
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -35,7 +35,7 @@ export default {
 | 
			
		|||
 | 
			
		||||
            // let all of app know who the user is(n't)
 | 
			
		||||
            this.$store.commit('SET_USER', response.data.user)
 | 
			
		||||
            this.$store.commit('SET_USER_IS_ROOT', response.data.user.is_root)
 | 
			
		||||
            this.$store.commit('SET_USER_IS_ROOT', response.data.user ? response.data.user.is_root : false)
 | 
			
		||||
 | 
			
		||||
            // also keep track of user's permissions
 | 
			
		||||
            this.$store.commit('SET_PERMISSIONS', response.data.permissions)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue