* allow reference group changes
Этот коммит содержится в:
Ben Cooke
2025-03-31 15:49:55 -04:00
коммит произвёл GitHub
родитель 7e439a7f7e
Коммит ce9632cca3
10 изменённых файлов: 441 добавлений и 123 удалений

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

@@ -85,8 +85,8 @@ func (a *App) GetGroupsBySource(groupSource model.GroupSource) ([]*model.Group,
return groups, nil
}
func (a *App) GetGroupsByUserId(userID string) ([]*model.Group, *model.AppError) {
groups, err := a.Srv().Store().Group().GetByUser(userID)
func (a *App) GetGroupsByUserId(userID string, opts model.GroupSearchOpts) ([]*model.Group, *model.AppError) {
groups, err := a.Srv().Store().Group().GetByUser(userID, opts)
if err != nil {
return nil, model.NewAppError("GetGroupsByUserId", "app.select_error", nil, "", http.StatusInternalServerError).Wrap(err)
}

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

@@ -661,7 +661,7 @@ func (api *PluginAPI) GetGroupsBySource(groupSource model.GroupSource) ([]*model
}
func (api *PluginAPI) GetGroupsForUser(userID string) ([]*model.Group, *model.AppError) {
return api.app.GetGroupsByUserId(userID)
return api.app.GetGroupsByUserId(userID, model.GroupSearchOpts{})
}
func (api *PluginAPI) UpsertGroupMember(groupID string, userID string) (*model.GroupMember, *model.AppError) {