Implement account type restricted page

Add allowedAccountTypes page metadata which the authenticated middleware
uses to further restrict the types of accounts that can access the page.

If the account type is insufficent to access the page it will return an
HTTP 403 Forbidden status, which is rendered using the error page.
This commit is contained in:
Hornwitser 2025-03-09 22:21:13 +01:00
parent 245169950a
commit e8226e0062
6 changed files with 82 additions and 3 deletions

21
error.vue Normal file
View file

@ -0,0 +1,21 @@
<template>
<Header />
<h1>{{ error.statusCode }} {{ error.statusMessage }}</h1>
{{ error.message }}
</template>
<script setup lang="ts">
defineProps<{ error: {
statusCode: number,
fatal: boolean,
unhandled: boolean,
statusMessage?: string,
data?: unknown,
cause?: unknown,
// Undocumented fields
url?: string,
message?: string,
stack?: string,
} }>()
</script>