readonly default based on mapper type (#1534)

This commit is contained in:
mfrances17 2021-11-12 10:09:08 -05:00 committed by GitHub
parent c61ba73781
commit 3b86616739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,9 @@ export const LdapMapperUserAttribute = ({
> >
<Controller <Controller
name="config.read-only" name="config.read-only"
defaultValue={["true"]} defaultValue={
mapperType === "user-attribute-ldap-mapper" ? ["true"] : ["false"]
}
control={form.control} control={form.control}
render={({ onChange, value }) => ( render={({ onChange, value }) => (
<Switch <Switch