fix(ldap/tls): allow to upload tls ca certificate [EE-3654] (#7340)

pull/7454/head
Oscar Zhou 2022-08-09 17:19:32 +12:00 committed by GitHub
parent fb14a85483
commit e5b27d7a57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 2 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@ storybook-static
.tmp .tmp
**/.vscode/settings.json **/.vscode/settings.json
**/.vscode/tasks.json **/.vscode/tasks.json
.vscode
*.DS_Store *.DS_Store
.eslintcache .eslintcache

View File

@ -5,6 +5,7 @@ export const ldapSettings = {
controller, controller,
bindings: { bindings: {
settings: '=', settings: '=',
tlscaCert: '=',
state: '<', state: '<',
connectivityCheck: '<', connectivityCheck: '<',
onSaveSettings: '<', onSaveSettings: '<',

View File

@ -31,7 +31,7 @@ export default class LdapSettingsController {
} }
$onInit() { $onInit() {
this.tlscaCert = this.settings.TLSCACert; this.tlscaCert = this.settings.TLSConfig.TLSCACert;
} }
onChangeServerType(serverType) { onChangeServerType(serverType) {

View File

@ -187,7 +187,7 @@ function SettingsAuthenticationController($q, $scope, $state, Notifications, Set
return ( return (
_.compact(ldapSettings.URLs).length && _.compact(ldapSettings.URLs).length &&
(ldapSettings.AnonymousMode || (ldapSettings.ReaderDN && ldapSettings.Password)) && (ldapSettings.AnonymousMode || (ldapSettings.ReaderDN && ldapSettings.Password)) &&
(!isTLSMode || $scope.formValues.TLSCACert || ldapSettings.TLSConfig.TLSSkipVerify) && (!isTLSMode || (isTLSMode && $scope.formValues.TLSCACert) || ldapSettings.TLSConfig.TLSSkipVerify) &&
(!$scope.settings.LDAPSettings.AdminAutoPopulate || ($scope.settings.LDAPSettings.AdminAutoPopulate && $scope.formValues.selectedAdminGroups.length > 0)) (!$scope.settings.LDAPSettings.AdminAutoPopulate || ($scope.settings.LDAPSettings.AdminAutoPopulate && $scope.formValues.selectedAdminGroups.length > 0))
); );
} }