add missing field and change default (#1512)

This commit is contained in:
mfrances17 2021-11-10 04:56:39 -05:00 committed by GitHub
parent de8289064d
commit 50548491f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 1 deletions

View file

@ -147,6 +147,8 @@ export default {
"If on, then during reading of the LDAP attribute value will always used instead of the value from Keycloak DB.",
isMandatoryInLdapHelp:
"If true, attribute is mandatory in LDAP. Hence if there is no value in Keycloak DB, the empty value will be set to be propagated to LDAP.",
attributeDefaultValueHelp:
"If there is no value in Keycloak DB and attribute is mandatory in LDAP, this value will be propagated to LDAP.",
isBinaryAttributeHelp: "Should be true for binary LDAP attributes.",
derFormattedHelp:

View file

@ -74,7 +74,7 @@ export const LdapMapperUserAttribute = ({
>
<Controller
name="config.read-only"
defaultValue={["false"]}
defaultValue={["true"]}
control={form.control}
render={({ onChange, value }) => (
<Switch
@ -144,6 +144,25 @@ export const LdapMapperUserAttribute = ({
)}
></Controller>
</FormGroup>
<FormGroup
label={t("attributeDefaultValue")}
labelIcon={
<HelpItem
helpText={helpText("attributeDefaultValueHelp")}
forLabel={t("attributeDefaultValue")}
forID="kc-attribute-default-value"
/>
}
fieldId="kc-attribute-default-value"
>
<TextInput
type="text"
id="kc-attribute-default-value"
data-testid="mapper-attributeDefaultValue-fld"
name="config.attribute-default-value[0]"
ref={form.register}
/>
</FormGroup>
<FormGroup
label={t("isBinaryAttribute")}
labelIcon={

View file

@ -188,6 +188,7 @@ export default {
readOnly: "Read only",
alwaysReadValueFromLdap: "Always read value from LDAP",
isMandatoryInLdap: "Is mandatory in LDAP",
attributeDefaultValue: "Attribute default value",
isBinaryAttribute: "Is binary attribute",
derFormatted: "DER formatted",