[MM-56491] Allow sysadmins to LDAP sync SAML users when SamlSettings.EnableSyncWithLdap is true (#25886)

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Ben Cooke
2024-03-15 09:40:05 -04:00
коммит произвёл GitHub
родитель 7c0a3b0297
Коммит b14213d329
3 изменённых файлов: 32 добавлений и 7 удалений

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

@@ -433,7 +433,7 @@ func addUserToGroupSyncables(c *Context, w http.ResponseWriter, r *http.Request)
return
}
if user.AuthService != model.UserAuthServiceLdap {
if user.AuthService != model.UserAuthServiceLdap && (user.AuthService != model.UserAuthServiceSaml || !*c.App.Config().SamlSettings.EnableSyncWithLdap) {
c.Err = model.NewAppError("addUserToGroupSyncables", "api.user.add_user_to_group_syncables.not_ldap_user.app_error", nil, "", http.StatusBadRequest)
return
}