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>
This commit is contained in:
Scott Bishel
2020-08-18 10:18:21 -06:00
committed by GitHub
parent e1ca3e348f
commit f6bce5b32a

View File

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