<template>
  <div>
    <!-- <UserProfileInfo :user='user' /> -->
  </div>
</template>

<script>
export default {
  middleware({ store, redirect }) {
    if (!store.state.auth.loggedIn) {
      return redirect("/user/authorization");
    } else if (store.state.auth.user.user_permission_group == 3) {
      return redirect("/admin/publications");
    } else if (store.state.auth.user.is_allow_acess_to_admin_page === true) {
      window.location.href = '/admin';
    } else {
      return redirect("/user/profile");
    }
  },
  mounted() {
    console.log(this.$store.state.auth);
    console.log(this.$axios);
  },
};
</script>

<style>
</style>