From 003bf7fdf32a4ec52de5ff4f6d8222f141961f0c Mon Sep 17 00:00:00 2001 From: Fred KISSIE Date: Thu, 19 Feb 2026 04:59:51 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20hide=20otp,=20rules=20and=20reso?= =?UTF-8?q?urce=20rules=20config=20by=20default?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- messages/en-US.json | 6 +- .../resources/policies/create/page.tsx | 2 +- src/components/CreatePolicyForm.tsx | 91 +++++++++++++++++-- src/components/tags/tag-popover.tsx | 10 +- 4 files changed, 98 insertions(+), 11 deletions(-) diff --git a/messages/en-US.json b/messages/en-US.json index 58a772967..91cf42c53 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -176,7 +176,11 @@ "resourcePolicyName": "Policy Name", "resourcePolicyNameDescription": "Give this policy a name to identify it across your resources", "resourcePolicyNamePlaceholder": "e.g. Internal Access Policy", - "policiesSeeAll": "See All Policies", + "resourcePoliciesSeeAll": "See All Policies", + "resourcePolicyAuthMethodAdd": "Add Authentication Method", + "resourcePolicyOtpEmailAdd": "Add OTP emails", + "resourcePolicyRulesAdd": "Add Rules", + "rulesResourcePolicyDescription": "Configure rules to control access resources associated to this 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 index e43ef39ee..19fd2ca37 100644 --- a/src/app/[orgId]/settings/(private)/resources/policies/create/page.tsx +++ b/src/app/[orgId]/settings/(private)/resources/policies/create/page.tsx @@ -35,7 +35,7 @@ export default async function CreateResourcePolicyPage( diff --git a/src/components/CreatePolicyForm.tsx b/src/components/CreatePolicyForm.tsx index 96154edfe..01d56fa46 100644 --- a/src/components/CreatePolicyForm.tsx +++ b/src/components/CreatePolicyForm.tsx @@ -88,7 +88,8 @@ import { Check, ChevronsUpDown, InfoIcon, - Key + Key, + Plus } from "lucide-react"; import { useTranslations } from "next-intl"; @@ -314,8 +315,8 @@ function PolicyUsersRolesSection({ allIdps }: PolicyUsersRolesSectionProps) { const t = useTranslations(); - const [ssoEnabled, setSsoEnabled] = useState(true); - const [selectedIdpId, setSelectedIdpId] = useState(null); + const ssoEnabled = form.watch("sso"); + const selectedIdpId = form.watch("skipToIdpId"); const [activeRolesTagIndex, setActiveRolesTagIndex] = useState< number | null >(null); @@ -338,9 +339,8 @@ function PolicyUsersRolesSection({ { - setSsoEnabled(val); form.setValue("sso", val); }} /> @@ -445,11 +445,9 @@ function PolicyUsersRolesSection({