Rename methods provided by plugin
This commit is contained in:
		
							parent
							
								
									dee27b51f5
								
							
						
					
					
						commit
						4189bdf919
					
				
					 1 changed files with 18 additions and 3 deletions
				
			
		|  | @ -3,7 +3,7 @@ export function ByjovePlugin(Vue) { | |||
|     Vue.mixin({ | ||||
|         methods: { | ||||
| 
 | ||||
|             $loginUser(user, permissions) { | ||||
|             $byjoveLoginUser(user, permissions) { | ||||
| 
 | ||||
|                 // put user info in app store
 | ||||
|                 this.$store.commit('SET_USER', user) | ||||
|  | @ -17,7 +17,12 @@ export function ByjovePlugin(Vue) { | |||
|                 } | ||||
|             }, | ||||
| 
 | ||||
|             $logoutUser() { | ||||
|             // TODO: deprecate / remove
 | ||||
|             $loginUser(user, permission) { | ||||
|                 this.$byjoveLoginUser(user, permission) | ||||
|             }, | ||||
| 
 | ||||
|             $byjoveLogoutUser() { | ||||
| 
 | ||||
|                 // remove user info from app store
 | ||||
|                 this.$store.commit('SET_USER', null) | ||||
|  | @ -25,7 +30,12 @@ export function ByjovePlugin(Vue) { | |||
|                 this.$store.commit('SET_USER_IS_ROOT', false) | ||||
|             }, | ||||
| 
 | ||||
|             $hasPerm(name) { | ||||
|             // TODO: deprecate / remove
 | ||||
|             $logoutUser() { | ||||
|                 this.$byjoveLogoutUser() | ||||
|             }, | ||||
| 
 | ||||
|             $byjoveHasPerm(name) { | ||||
| 
 | ||||
|                 // if user is root then assume permission
 | ||||
|                 if (this.$store.state.user_is_root) { | ||||
|  | @ -35,6 +45,11 @@ export function ByjovePlugin(Vue) { | |||
|                 // otherwise do true perm check for user
 | ||||
|                 return this.$store.state.permissions.includes(name) | ||||
|             }, | ||||
| 
 | ||||
|             // TODO: deprecate / remove
 | ||||
|             $hasPerm(name) { | ||||
|                 return this.$byjoveHasPerm(name) | ||||
|             }, | ||||
|         } | ||||
|     }) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lance Edgar
						Lance Edgar