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:
Lance Edgar 2022-11-21 16:46:33 -06:00
parent a2e35933e7
commit 64a2b05c7a
2 changed files with 2 additions and 2 deletions

View file

@ -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('/')
}
},

View file

@ -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')) {