From eebd9f8498a3c092ea76fcdade4d16aa3a2117a0 Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 6 Dec 2021 15:57:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=E3=80=82?= 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index aaea2fcc6..22a8ee6c2 100644 --- a/routers/repo/ai_model_manage.go +++ b/routers/repo/ai_model_manage.go @@ -404,7 +404,7 @@ func ShowModelTemplate(ctx *context.Context) { func isQueryRight(ctx *context.Context) bool { if ctx.Repo.Repository.IsPrivate { - if ctx.User.IsAdmin || ctx.Repo.IsAdmin() || ctx.Repo.IsOwner() || ctx.Repo.CanRead(models.UnitTypeCloudBrain) { + if ctx.Repo.CanRead(models.UnitTypeCloudBrain) || ctx.User.IsAdmin || ctx.Repo.IsAdmin() || ctx.Repo.IsOwner() { return true } return false @@ -447,6 +447,8 @@ func ShowModelPageInfo(ctx *context.Context) { } for _, model := range modelResult { + log.Info("model=" + model.Name) + log.Info("model.UserId=" + fmt.Sprint(model.UserId)) model.IsCanOper = isOper(ctx, model.UserId) }