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

13
index.d.ts vendored Normal file
View file

@ -0,0 +1,13 @@
declare module "#app" {
interface PageMeta {
allowedAccountTypes?: string[],
}
}
declare module "vue-router" {
interface RouteMeta {
allowedAccountTypes?: string[],
}
}
export {}