diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-05-10 09:46:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-10 09:46:09 -0700 |
commit | d8dd271e43550ab043c2db36c274092d7819fcab (patch) | |
tree | e297c0534a9684d57fc254281cf5cbc3d7c08e0f /app/ldap.go | |
parent | db6b8f6238853c6e7e48dc8015a0b25f97ee232a (diff) | |
download | chat-d8dd271e43550ab043c2db36c274092d7819fcab.tar.gz chat-d8dd271e43550ab043c2db36c274092d7819fcab.tar.bz2 chat-d8dd271e43550ab043c2db36c274092d7819fcab.zip |
MM-4998 Adding LoginIdAttribute to allow LDAP users to change their login ID without losing their account (#8756)
* Adding LoginIdAttribute
* Modifying LDAP to use loginIDAttribute.
* Adding IDAttribute migration and AD objectGUID support.
* Removing unused idea.
* Fix typo.
Diffstat (limited to 'app/ldap.go')
-rw-r--r-- | app/ldap.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/ldap.go b/app/ldap.go index 22c3b746b..544905b70 100644 --- a/app/ldap.go +++ b/app/ldap.go @@ -40,7 +40,7 @@ func (a *App) TestLdap() *model.AppError { return nil } -func (a *App) SwitchEmailToLdap(email, password, code, ldapId, ldapPassword string) (string, *model.AppError) { +func (a *App) SwitchEmailToLdap(email, password, code, ldapLoginId, ldapPassword string) (string, *model.AppError) { if a.License() != nil && !*a.Config().ServiceSettings.ExperimentalEnableAuthenticationTransfer { return "", model.NewAppError("emailToLdap", "api.user.email_to_ldap.not_available.app_error", nil, "", http.StatusForbidden) } @@ -63,7 +63,7 @@ func (a *App) SwitchEmailToLdap(email, password, code, ldapId, ldapPassword stri return "", model.NewAppError("SwitchEmailToLdap", "api.user.email_to_ldap.not_available.app_error", nil, "", http.StatusNotImplemented) } - if err := ldapInterface.SwitchToLdap(user.Id, ldapId, ldapPassword); err != nil { + if err := ldapInterface.SwitchToLdap(user.Id, ldapLoginId, ldapPassword); err != nil { return "", err } @@ -95,7 +95,7 @@ func (a *App) SwitchLdapToEmail(ldapPassword, code, email, newPassword string) ( return "", model.NewAppError("SwitchLdapToEmail", "api.user.ldap_to_email.not_available.app_error", nil, "", http.StatusNotImplemented) } - if err := ldapInterface.CheckPassword(*user.AuthData, ldapPassword); err != nil { + if err := ldapInterface.CheckPasswordAuthData(*user.AuthData, ldapPassword); err != nil { return "", err } |