add forceResetPassword check to layout
This commit is contained in:
parent
8ca3624e24
commit
acc8fc6232
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { onMount } from "svelte"
|
|
||||||
import { isActive, redirect } from "@roxi/routify"
|
import { isActive, redirect } from "@roxi/routify"
|
||||||
import { admin, auth } from "stores/portal"
|
import { admin, auth } from "stores/portal"
|
||||||
|
import { onMount } from "svelte"
|
||||||
|
|
||||||
let loaded = false
|
let loaded = false
|
||||||
$: hasAdminUser = !!$admin?.checklist?.adminUser
|
$: hasAdminUser = !!$admin?.checklist?.adminUser
|
||||||
|
@ -29,6 +29,8 @@
|
||||||
!$isActive("./invite")
|
!$isActive("./invite")
|
||||||
) {
|
) {
|
||||||
$redirect("./auth/login")
|
$redirect("./auth/login")
|
||||||
|
} else if ($auth?.user?.forceResetPassword) {
|
||||||
|
$redirect("./auth/reset")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue