fix(auth/ldap): show server url [EE-2069] (#6651)

pull/6658/head
Chaim Lev-Ari 2022-03-15 07:13:39 +02:00 committed by GitHub
parent f2c48409e0
commit 9a42d4c506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -222,13 +222,6 @@ function SettingsAuthenticationController($q, $scope, $state, Notifications, Set
$scope.authMethod = 4;
}
$scope.formValues.ldap.serverType = settings.LDAPSettings.ServerType;
if (settings.LDAPSettings.ServerType === 2) {
$scope.formValues.ldap.adSettings = settings.LDAPSettings;
} else {
$scope.formValues.ldap.ldapSettings = Object.assign($scope.formValues.ldap.ldapSettings, settings.LDAPSettings);
}
if (settings.LDAPSettings.URL) {
settings.LDAPSettings.URLs = [settings.LDAPSettings.URL];
}
@ -241,6 +234,13 @@ function SettingsAuthenticationController($q, $scope, $state, Notifications, Set
if (!settings.LDAPSettings.ServerType) {
settings.LDAPSettings.ServerType = 0;
}
$scope.formValues.ldap.serverType = settings.LDAPSettings.ServerType;
if (settings.LDAPSettings.ServerType === 2) {
$scope.formValues.ldap.adSettings = settings.LDAPSettings;
} else {
$scope.formValues.ldap.ldapSettings = Object.assign($scope.formValues.ldap.ldapSettings, settings.LDAPSettings);
}
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to retrieve application settings');