From efc3304fe1d0bd4e30aa9946cea988e111b3f870 Mon Sep 17 00:00:00 2001 From: Scott Bishel Date: Wed, 21 Oct 2020 16:59:54 -0600 Subject: [PATCH] MM-29522:fix typo in constant name (#15933) * fix type in constant name * fix lint Co-authored-by: Mattermod --- app/ldap.go | 4 ++-- model/client4.go | 2 +- model/ldap.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/ldap.go b/app/ldap.go index e717701367..d55bbb9b99 100644 --- a/app/ldap.go +++ b/app/ldap.go @@ -199,12 +199,12 @@ func (a *App) writeLdapFile(filename string, fileData *multipart.FileHeader) *mo } func (a *App) AddLdapPublicCertificate(fileData *multipart.FileHeader) *model.AppError { - if err := a.writeLdapFile(model.LDAP_PUBIC_CERTIFICATE_NAME, fileData); err != nil { + if err := a.writeLdapFile(model.LDAP_PUBLIC_CERTIFICATE_NAME, fileData); err != nil { return err } cfg := a.Config().Clone() - *cfg.LdapSettings.PublicCertificateFile = model.LDAP_PUBIC_CERTIFICATE_NAME + *cfg.LdapSettings.PublicCertificateFile = model.LDAP_PUBLIC_CERTIFICATE_NAME if err := cfg.IsValid(); err != nil { return err diff --git a/model/client4.go b/model/client4.go index 8e1c7a0fbb..662d71dd0d 100644 --- a/model/client4.go +++ b/model/client4.go @@ -4094,7 +4094,7 @@ func (c *Client4) MigrateAuthToSaml(fromAuthService string, usersMap map[string] // UploadLdapPublicCertificate will upload a public certificate for LDAP and set the config to use it. func (c *Client4) UploadLdapPublicCertificate(data []byte) (bool, *Response) { - body, writer, err := fileToMultipart(data, LDAP_PUBIC_CERTIFICATE_NAME) + body, writer, err := fileToMultipart(data, LDAP_PUBLIC_CERTIFICATE_NAME) if err != nil { return false, &Response{Error: NewAppError("UploadLdapPublicCertificate", "model.client.upload_ldap_cert.app_error", nil, err.Error(), http.StatusBadRequest)} } diff --git a/model/ldap.go b/model/ldap.go index 4e19c5b1e0..1262dfb8f9 100644 --- a/model/ldap.go +++ b/model/ldap.go @@ -4,7 +4,7 @@ package model const ( - USER_AUTH_SERVICE_LDAP = "ldap" - LDAP_PUBIC_CERTIFICATE_NAME = "ldap-public.crt" - LDAP_PRIVATE_KEY_NAME = "ldap-private.key" + USER_AUTH_SERVICE_LDAP = "ldap" + LDAP_PUBLIC_CERTIFICATE_NAME = "ldap-public.crt" + LDAP_PRIVATE_KEY_NAME = "ldap-private.key" )