diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 67b592d1a..3a9ff88ba 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -998,7 +998,11 @@ func isCanDownload(ctx *context.Context, task *models.AiModelManage) bool { if ctx.User == nil { return false } - if ctx.User.IsAdmin || ctx.User.ID == task.UserId || ctx.Repo.HasAccess() { + isCollaborator, err := ctx.Repo.Repository.IsCollaborator(ctx.User.ID) + if err != nil { + log.Info("query error.") + } + if ctx.User.IsAdmin || ctx.User.ID == task.UserId || isCollaborator { return true } if !task.IsPrivate {