From fee44ce96009f4996a1850f21e3155fd0a3e6c30 Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Thu, 12 Mar 2026 18:52:13 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20navigate=20to=20policy=20to=20edit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- messages/en-US.json | 2 ++ .../proxy/[niceId]/authentication/page.tsx | 28 ++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/messages/en-US.json b/messages/en-US.json index efaf777b5..02b5440d4 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -733,6 +733,8 @@ "resourceAuthMethods": "Authentication Methods", "resourcePolicyAuthMethodsEmpty": "No authentication method", "resourcePolicyOtpEmpty": "No one time password", + "resourcePolicyReadOnly": "This policy is Read only", + "resourcePolicyReadOnlyDescription": "This resource policy is shared accross multiple resources, you cannot edit it in this page. Please go to the policy settings to edit", "resourcePolicyTypeSave": "Save Resource type", "resourcePolicySelect": "Select resource policy", "resourcePolicyNotFound": "Policy not found", diff --git a/src/app/[orgId]/settings/resources/proxy/[niceId]/authentication/page.tsx b/src/app/[orgId]/settings/resources/proxy/[niceId]/authentication/page.tsx index bb6059588..c06ce6a4e 100644 --- a/src/app/[orgId]/settings/resources/proxy/[niceId]/authentication/page.tsx +++ b/src/app/[orgId]/settings/resources/proxy/[niceId]/authentication/page.tsx @@ -1,5 +1,6 @@ "use client"; +import ActionBanner from "@app/components/ActionBanner"; import { EditPolicyForm } from "@app/components/resource-policy/EditPolicyForm"; import { SettingsContainer, @@ -40,8 +41,9 @@ import { ResourcePolicyProvider } from "@app/providers/ResourcePolicyProvider"; import { zodResolver } from "@hookform/resolvers/zod"; import { CaretSortIcon } from "@radix-ui/react-icons"; import { useQuery, useQueryClient } from "@tanstack/react-query"; -import { CheckIcon } from "lucide-react"; +import { ArrowRightIcon, CheckIcon, ShieldAlertIcon } from "lucide-react"; import { useTranslations } from "next-intl"; +import Link from "next/link"; import { useRouter } from "next/navigation"; import { useEffect, useState, useTransition } from "react"; import { useForm, useWatch } from "react-hook-form"; @@ -282,6 +284,30 @@ export default function ResourceAuthenticationPage() { policy={policies.sharedPolicy} key={policies.sharedPolicy.resourcePolicyId} > + + } + description={t( + "resourcePolicyReadOnlyDescription" + )} + actions={ + + } + /> )