mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
fix(auth/ldap): show server url [EE-2069] (#6651)
This commit is contained in:
parent
f2c48409e0
commit
9a42d4c506
1 changed files with 7 additions and 7 deletions
|
@ -222,13 +222,6 @@ function SettingsAuthenticationController($q, $scope, $state, Notifications, Set
|
||||||
$scope.authMethod = 4;
|
$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) {
|
if (settings.LDAPSettings.URL) {
|
||||||
settings.LDAPSettings.URLs = [settings.LDAPSettings.URL];
|
settings.LDAPSettings.URLs = [settings.LDAPSettings.URL];
|
||||||
}
|
}
|
||||||
|
@ -241,6 +234,13 @@ function SettingsAuthenticationController($q, $scope, $state, Notifications, Set
|
||||||
if (!settings.LDAPSettings.ServerType) {
|
if (!settings.LDAPSettings.ServerType) {
|
||||||
settings.LDAPSettings.ServerType = 0;
|
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) {
|
.catch(function error(err) {
|
||||||
Notifications.error('Failure', err, 'Unable to retrieve application settings');
|
Notifications.error('Failure', err, 'Unable to retrieve application settings');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue