From 1314893730d4e77654fea525c36bd2abd219ee99 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 12 Dec 2022 11:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=81=E6=9C=89=E5=8F=8A=E5=85=AC=E6=9C=89?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=A2=9C=E8=89=B2=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- routers/repo/ai_model_manage.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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() {