🚧 create resource policy table

This commit is contained in:
Fred KISSIE
2026-02-14 05:08:41 +01:00
parent 801f6fb661
commit 7177ab7f77
2 changed files with 34 additions and 0 deletions

View File

@@ -171,6 +171,8 @@
"resourcePoliciesSearch": "Search policies...",
"resourcePoliciesAdd": "Add Policy",
"resourcePoliciesDefaultBadgeText": "Default policy",
"resourcePoliciesCreate": "Create Resource Policy",
"resourcePoliciesCreateDescription": "Follow the steps below to create a new policy",
"authentication": "Authentication",
"protected": "Protected",
"notProtected": "Not Protected",

View File

@@ -0,0 +1,32 @@
import SettingsSectionTitle from "@app/components/SettingsSectionTitle";
import { getCachedOrg } from "@app/lib/api/getCachedOrg";
import type { GetOrgResponse } from "@server/routers/org";
import { getTranslations } from "next-intl/server";
import { redirect } from "next/navigation";
export interface CreateResourcePolicyPageProps {
params: Promise<{ orgId: string }>;
}
export default async function CreateResourcePolicyPage(
props: CreateResourcePolicyPageProps
) {
const params = await props.params;
const t = await getTranslations();
let org: GetOrgResponse | null = null;
try {
const res = await getCachedOrg(params.orgId);
org = res.data.data;
} catch {
redirect(`/${params.orgId}/settings/resources`);
}
return (
<>
<SettingsSectionTitle
title={t("resourcePoliciesCreate")}
description={t("resourcePoliciesCreateDescription")}
/>
</>
);
}