From b42b93d8adcf463dc7cc4422cf6718d698c95236 Mon Sep 17 00:00:00 2001 From: Derick Montague Date: Tue, 3 Dec 2019 12:52:42 -0600 Subject: Fix LDAP request resulting in 400 response - Remove all references to the AuthenticationType property since our request is a PATCH and we are not changing the value. Resolves: https://github.com/openbmc/phosphor-webui/issues/102 Signed-off-by: Derick Montague Change-Id: I911ac41bf61250847e4c308f09df8fd59dd27fa7 --- app/access-control/controllers/ldap-controller.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/app/access-control/controllers/ldap-controller.js b/app/access-control/controllers/ldap-controller.js index 16992ec..e77bf86 100644 --- a/app/access-control/controllers/ldap-controller.js +++ b/app/access-control/controllers/ldap-controller.js @@ -44,7 +44,6 @@ window.angular && (function(angular) { getBaseDistinguishedNames(data); const groupsAttribute = getGroupsAttribute(data); const usernameAttribute = getUsernameAttribute(data); - const authenticationType = getAuthenticationType(data); const roleGroups = getRoleGroups(data); @@ -60,7 +59,6 @@ window.angular && (function(angular) { 'BaseDistinguishedNames': baseDistinguishedNames, 'GroupsAttribute': groupsAttribute, 'UsernameAttribute': usernameAttribute, - 'AuthenticationType': authenticationType, 'RoleGroups': roleGroups }; }, @@ -268,7 +266,6 @@ window.angular && (function(angular) { return groupsAttribute; } - /** * * @param {Object} ldapProperties @@ -284,21 +281,6 @@ window.angular && (function(angular) { return userNameAttribute; } - /** - * - * @param {Object} ldapProperties - * @returns {null | string} - */ - function getAuthenticationType(ldapProperties) { - let authenticationType = null; - let serviceType = getEnabledServiceType(ldapProperties); - if (serviceType) { - authenticationType = - ldapProperties[serviceType]['Authentication']['AuthenticationType']; - } - return authenticationType; - } - /** * * @param {Object} ldapProperties @@ -323,8 +305,7 @@ window.angular && (function(angular) { const ServiceEnabled = true; const Authentication = { Username: ldapProperties.Username, - Password: ldapProperties.Password, - AuthenticationType: ldapProperties.AuthenticationType + Password: ldapProperties.Password }; const LDAPService = { SearchSettings: { -- cgit v1.2.1