From e8226e00626bc0fa3b8a0062dacfee661a6b08a8 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sun, 9 Mar 2025 22:21:13 +0100 Subject: [PATCH] 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. --- components/Header.vue | 12 ++++++++++-- error.vue | 21 +++++++++++++++++++++ index.d.ts | 13 +++++++++++++ middleware/authenticated.ts | 11 +++++++++++ pages/edit.vue | 13 +++++++++++++ pages/index.vue | 15 ++++++++++++++- 6 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 error.vue create mode 100644 index.d.ts create mode 100644 pages/edit.vue diff --git a/components/Header.vue b/components/Header.vue index 4ab147c..28de4eb 100644 --- a/components/Header.vue +++ b/components/Header.vue @@ -2,8 +2,15 @@