[MM-33908] Resync LDAP Groups to Teams and Channels (#17372)
* add includeRemovedMembers flag * fix API call in client4.go * remove check for 'since' * add comments * run make app-layers * re-run CI tests Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3e5b0a7d7f
Коммит
9f4902e188
@@ -3367,7 +3367,7 @@ func (s *OpenTracingLayerGroupStore) ChannelMembersMinusGroupMembers(channelID s
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string) ([]*model.UserChannelIDPair, error) {
|
||||
func (s *OpenTracingLayerGroupStore) ChannelMembersToAdd(since int64, channelID *string, includeRemovedMembers bool) ([]*model.UserChannelIDPair, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.ChannelMembersToAdd")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -3376,7 +3376,7 @@ func (s *OpenTracingLayerGroupStore) ChannelMembersToAdd(since int64, channelID
|
||||
}()
|
||||
|
||||
defer span.Finish()
|
||||
result, err := s.GroupStore.ChannelMembersToAdd(since, channelID)
|
||||
result, err := s.GroupStore.ChannelMembersToAdd(since, channelID, includeRemovedMembers)
|
||||
if err != nil {
|
||||
span.LogFields(spanlog.Error(err))
|
||||
ext.Error.Set(span, true)
|
||||
@@ -4033,7 +4033,7 @@ func (s *OpenTracingLayerGroupStore) TeamMembersMinusGroupMembers(teamID string,
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersToAdd(since int64, teamID *string) ([]*model.UserTeamIDPair, error) {
|
||||
func (s *OpenTracingLayerGroupStore) TeamMembersToAdd(since int64, teamID *string, includeRemovedMembers bool) ([]*model.UserTeamIDPair, error) {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "GroupStore.TeamMembersToAdd")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
@@ -4042,7 +4042,7 @@ func (s *OpenTracingLayerGroupStore) TeamMembersToAdd(since int64, teamID *strin
|
||||
}()
|
||||
|
||||
defer span.Finish()
|
||||
result, err := s.GroupStore.TeamMembersToAdd(since, teamID)
|
||||
result, err := s.GroupStore.TeamMembersToAdd(since, teamID, includeRemovedMembers)
|
||||
if err != nil {
|
||||
span.LogFields(spanlog.Error(err))
|
||||
ext.Error.Set(span, true)
|
||||
|
||||
Ссылка в новой задаче
Block a user