Added systems to handle banned users
This commit is contained in:
26
ui/src/pages/Banned.vue
Normal file
26
ui/src/pages/Banned.vue
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<div class="w-full max-w-2xl flex flex-col gap-8 justify-center mx-auto">
|
||||||
|
<h1 class="text-3xl sm:text-4xl font-bold text-left">
|
||||||
|
Access Restricted
|
||||||
|
</h1>
|
||||||
|
<div class="space-y-4 text-muted-foreground text-left leading-relaxed">
|
||||||
|
<p>
|
||||||
|
Your access to the <strong>17th Ranger Battalion</strong> has been
|
||||||
|
<strong>revoked</strong> due to a violation of our community standards
|
||||||
|
or policies.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
If you believe this action was taken in error or would like to better
|
||||||
|
understand the reason for this decision, you may
|
||||||
|
<strong>reach out to our administrative staff on Discord</strong>
|
||||||
|
to request clarification or discuss a potential appeal.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Regards,<br />
|
||||||
|
<span class="text-foreground font-medium">
|
||||||
|
The 17th Ranger Battalion Administration Team
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -19,6 +19,8 @@ const router = createRouter({
|
|||||||
{ path: '/profile', component: () => import('@/pages/MyProfile.vue'), meta: { requiresAuth: true } },
|
{ path: '/profile', component: () => import('@/pages/MyProfile.vue'), meta: { requiresAuth: true } },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ path: '/calendar', component: () => import('@/pages/Calendar.vue') },
|
{ path: '/calendar', component: () => import('@/pages/Calendar.vue') },
|
||||||
{ path: '/calendar/event/:id', component: () => import('@/pages/Calendar.vue') },
|
{ path: '/calendar/event/:id', component: () => import('@/pages/Calendar.vue') },
|
||||||
|
|
||||||
@@ -45,7 +47,10 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
|
|
||||||
// UNAUTHORIZED PAGE
|
// UNAUTHORIZED PAGE
|
||||||
{ path: '/unauthorized', component: () => import('@/pages/Unauthorized.vue') }
|
{ path: '/unauthorized', component: () => import('@/pages/Unauthorized.vue') },
|
||||||
|
|
||||||
|
{ path: '/restricted', component: () => import('@/pages/Banned.vue'), meta: { requiresAuth: true } },
|
||||||
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -68,6 +73,10 @@ router.beforeEach(async (to) => {
|
|||||||
return false // Prevent Vue Router from continuing
|
return false // Prevent Vue Router from continuing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// banned state
|
||||||
|
if (user.state === 'banned' && to.path !== '/restricted') {
|
||||||
|
return '/restricted';
|
||||||
|
}
|
||||||
|
|
||||||
// Must be a member
|
// Must be a member
|
||||||
if (to.meta.memberOnly && user.state !== 'member') {
|
if (to.meta.memberOnly && user.state !== 'member') {
|
||||||
|
|||||||
Reference in New Issue
Block a user