Check for user uuid, instead of presence of user object
in order to know which pages etc. to show for current user. now the user object is always at least an empty dict; will never be null
This commit is contained in:
parent
a2e35933e7
commit
64a2b05c7a
2 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ export default {
|
|||
|
||||
checkUser() {
|
||||
// send logged-in users to "home" instead
|
||||
if (this.$store.state.user) {
|
||||
if (this.$store.state.user.uuid) {
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
|
|
|
@ -133,7 +133,7 @@ export default {
|
|||
}
|
||||
|
||||
// is someone logged in?
|
||||
if (this.$store.state.user) {
|
||||
if (this.$store.state.user.uuid) {
|
||||
|
||||
// go ahead and fetch data, but only if user has permission
|
||||
if (this.$hasPerm('ordering.worksheet')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue