fix: rename pending approval to no access

Member role simply has no UI permissions — not a pending state.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019cce57-c9e1-7732-9709-8288127573a9
This commit is contained in:
Aarnav Tale
2026-03-08 01:55:38 -05:00
parent 270b99f063
commit a1efe36ff1
2 changed files with 6 additions and 14 deletions
+5 -8
View File
@@ -53,7 +53,7 @@ export async function loader({ request, context }: Route.LoaderArgs) {
settings: context.auth.can(principal, Capabilities.read_feature),
},
onboarding: request.url.endsWith("/onboarding"),
pendingApproval: !check && principal.kind === "oidc",
noAccess: !check && principal.kind === "oidc",
healthy: await api.isHealthy(),
};
} catch {
@@ -66,20 +66,17 @@ export async function loader({ request, context }: Route.LoaderArgs) {
}
export default function Shell({ loaderData }: Route.ComponentProps) {
if (loaderData.pendingApproval && !loaderData.onboarding) {
if (loaderData.noAccess && !loaderData.onboarding) {
return (
<>
<Header {...loaderData} />
<main className="container mx-auto mt-4 mb-24 overscroll-contain">
<div className="mx-auto mt-24 max-w-lg">
<Card variant="flat">
<Card.Title className="mb-4">Pending Approval</Card.Title>
<Card.Title className="mb-4">No Access</Card.Title>
<Card.Text>
Your account has been created but you don't have access to the UI yet. An
administrator needs to assign you a role before you can continue.
</Card.Text>
<Card.Text className="mt-2">
If you believe this is a mistake, please contact your administrator.
Your account doesn't have permission to access the dashboard. Contact an
administrator if you need access.
</Card.Text>
<Form action="/logout" className="mt-6" method="POST">
<Button className="w-full" type="submit" variant="light">