diff --git a/routers/repo/dataset.go b/routers/repo/dataset.go index e5bc54b7d..53a2969fb 100755 --- a/routers/repo/dataset.go +++ b/routers/repo/dataset.go @@ -22,20 +22,6 @@ func MustEnableDataset(ctx *context.Context) { } } -func filterPrivateAttachments(ctx *context.Context, list []*models.Attachment) []*models.Attachment { - if ctx.Repo.CanWrite(models.UnitTypeDatasets) { - return list - } else { - var publicList []*models.Attachment - for _, attach := range list { - if !attach.IsPrivate { - publicList = append(publicList, attach) - } - } - return publicList - } -} - func newFilterPrivateAttachments(ctx *context.Context, list []*models.Attachment, repo *models.Repository) []*models.Attachment { if ctx.Repo.CanWrite(models.UnitTypeDatasets) {