MM-29107: Fix race in LDAP login (#16239)
* MM-29107: Fix race in LDAP login We remove the goroutine to make things synchronous. This removes the race and makes things more reliable. It is already tested by TestLogin in ldap_test.go in -race mode. https://mattermost.atlassian.net/browse/MM-29107 ```release-note NONE ``` * Address review comments Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
26676953a4
Коммит
4cdf239139
@@ -21,6 +21,6 @@ type LdapInterface interface {
|
||||
GetGroup(groupUID string) (*model.Group, *model.AppError)
|
||||
GetAllGroupsPage(page int, perPage int, opts model.LdapGroupSearchOpts) ([]*model.Group, int, *model.AppError)
|
||||
FirstLoginSync(user *model.User, userAuthService, userAuthData, email string) *model.AppError
|
||||
UpdateProfilePictureIfNecessary(model.User, *model.Session)
|
||||
UpdateProfilePictureIfNecessary(model.User, model.Session)
|
||||
GetADLdapIdFromSAMLId(authData string) string
|
||||
}
|
||||
|
||||
@@ -305,6 +305,6 @@ func (_m *LdapInterface) SwitchToLdap(userId string, ldapId string, ldapPassword
|
||||
}
|
||||
|
||||
// UpdateProfilePictureIfNecessary provides a mock function with given fields: _a0, _a1
|
||||
func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 model.User, _a1 *model.Session) {
|
||||
func (_m *LdapInterface) UpdateProfilePictureIfNecessary(_a0 model.User, _a1 model.Session) {
|
||||
_m.Called(_a0, _a1)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user