Skip to content

Commit

Permalink
Disable or hide restricted parts of settings tab for hosted policy
Browse files Browse the repository at this point in the history
  • Loading branch information
John Schulz committed Apr 7, 2021
1 parent 66fd534 commit a5cafed
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ export const AgentPolicyForm: React.FunctionComponent<Props> = ({
isInvalid={Boolean(touchedFields[name] && validation[name])}
>
<EuiFieldText
disabled={agentPolicy.is_managed === true}
fullWidth
value={agentPolicy[name]}
onChange={(e) => updateAgentPolicy({ [name]: e.target.value })}
Expand Down Expand Up @@ -283,7 +284,7 @@ export const AgentPolicyForm: React.FunctionComponent<Props> = ({
}}
/>
</EuiDescribedFormGroup>
{isEditing && 'id' in agentPolicy ? (
{isEditing && 'id' in agentPolicy && agentPolicy.is_managed !== true ? (
<EuiDescribedFormGroup
title={
<h4>
Expand Down

0 comments on commit a5cafed

Please sign in to comment.