Fleet UI: Ability to save new policies (team admin/team maintainer) (#11776)

This commit is contained in:
RachelElysia 2023-05-18 14:51:01 -04:00 committed by GitHub
parent 8829b84a63
commit 791183bb66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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