add forceResetPassword check to layout

This commit is contained in:
Keviin Åberg Kultalahti 2021-05-21 12:08:18 +02:00
parent eaa2821e75
commit 7888578d91
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<script>
import { onMount } from "svelte"
import { isActive, redirect } from "@roxi/routify"
import { admin, auth } from "stores/portal"
import { onMount } from "svelte"
let loaded = false
$: hasAdminUser = !!$admin?.checklist?.adminUser
@ -29,6 +29,8 @@
!$isActive("./invite")
) {
$redirect("./auth/login")
} else if ($auth?.user?.forceResetPassword) {
$redirect("./auth/reset")
}
}
</script>