mirror of https://github.com/portainer/portainer
fix(auth/ldap): show server url [EE-2069] (#6651)
parent
f2c48409e0
commit
9a42d4c506
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue