diff --git a/messages/en-US.json b/messages/en-US.json index d50073f1f..ffd28a518 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -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", diff --git a/src/app/[orgId]/settings/(private)/resources/policies/create/page.tsx b/src/app/[orgId]/settings/(private)/resources/policies/create/page.tsx new file mode 100644 index 000000000..02afa06cd --- /dev/null +++ b/src/app/[orgId]/settings/(private)/resources/policies/create/page.tsx @@ -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 ( + <> + + + ); +}