diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index 4884a815f..1155f3239 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -1022,9 +1022,13 @@ func isQueryPrivateModel(ctx *context.Context) bool { } isCollaborator, err := ctx.Repo.Repository.IsCollaborator(ctx.User.ID) if err != nil { - log.Info("query error.") + log.Info("query IsCollaborator error." + err.Error()) + } + isTeamMember, err := ctx.Repo.Repository.IsInRepoTeam(ctx.User.ID) + if err != nil { + log.Info("query IsInRepoTeam error." + err.Error()) } - if ctx.User.IsAdmin || isCollaborator { + if ctx.User.IsAdmin || isCollaborator || isTeamMember { return true } if ctx.Repo.IsOwner() {