Skip to content

Commit

Permalink
[PLAT-3084][Platform][UI]UI doesn't send the payload with "false" whe…
Browse files Browse the repository at this point in the history
…n we set ldap_enable_start_tls and enable_ldaps

Summary:
boolean false value is ignored by axios put method

fix: posted false as string

Test Plan:
Tested manually

Tested saving LDAP config (payload)
Tested LDAP user login flow

Reviewers: kkannan, ssutar, lsangappa, cpadinjareveettil

Reviewed By: cpadinjareveettil

Subscribers: jenkins-bot, ui

Differential Revision: https://phabricator.dev.yugabyte.com/D15444
  • Loading branch information
athulsn committed Feb 14, 2022
1 parent dc8b17f commit 5a07972
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions managed/ui/src/components/users/UserAuth/LDAPAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export const LDAPAuth = (props) => {
...values,
ldap_url: ldap_url ?? '',
ldap_port: ldap_port ?? '',
enable_ldaps: security === 'enable_ldaps',
enable_ldap_start_tls: security === 'enable_ldap_start_tls'
enable_ldaps: `${security === 'enable_ldaps'}`,
enable_ldap_start_tls: `${security === 'enable_ldap_start_tls'}`
};

delete transformedData.ldap_security;
Expand Down Expand Up @@ -165,7 +165,7 @@ export const LDAPAuth = (props) => {
showDialog(false);
await setRunTimeConfig({
key: `${LDAP_PATH}.use_ldap`,
value: false
value: 'false'
});
toast.warn(`LDAP authentication is disabled`, TOAST_OPTIONS);
};
Expand Down

0 comments on commit 5a07972

Please sign in to comment.