MM-29522:fix typo in constant name (#15933)

* fix type in constant name

* fix lint

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Scott Bishel
2020-10-21 16:59:54 -06:00
коммит произвёл GitHub
родитель 9b23ee659f
Коммит efc3304fe1
3 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@@ -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

Просмотреть файл

@@ -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)}
}

Просмотреть файл

@@ -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"
)