From 791183bb66fb6d21b09d41ede2e8f5ce749a74b4 Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Thu, 18 May 2023 14:51:01 -0400 Subject: [PATCH] Fleet UI: Ability to save new policies (team admin/team maintainer) (#11776) --- .../policies/PolicyPage/components/PolicyForm/PolicyForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx b/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx index 73f8bc097b..6ff5ba22e5 100644 --- a/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx +++ b/frontend/pages/policies/PolicyPage/components/PolicyForm/PolicyForm.tsx @@ -171,6 +171,7 @@ const PolicyForm = ({ }, [lastEditedQueryBody, lastEditedQueryId]); const hasSavePermissions = + !isEditMode || // save a new policy isGlobalAdmin || isGlobalMaintainer || (isTeamAdmin && policyTeamId === storedPolicy?.team_id) || // team admin cannot save global policy