MM-27852:Enable picture update for SAML (#15284)

* if ldap installed, attempt image update

* add license check

* add LDAP e10 license check

* check license not null, fix unit tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Scott Bishel
2020-08-18 10:18:21 -06:00
коммит произвёл GitHub
родитель e1ca3e348f
Коммит f6bce5b32a

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

@@ -174,7 +174,7 @@ func (a *App) DoLogin(w http.ResponseWriter, r *http.Request, user *model.User,
a.SetSession(session)
if user.AuthService == model.USER_AUTH_SERVICE_LDAP && a.Ldap() != nil {
if a.Srv().License() != nil && *a.Srv().License().Features.LDAP && a.Ldap() != nil {
a.Srv().Go(func() {
a.Ldap().UpdateProfilePictureIfNecessary(user, session)
})