From edfe2259d5deb01d2d50705528d6919198fcf10d Mon Sep 17 00:00:00 2001 From: zouap Date: Mon, 6 Dec 2021 15:43:17 +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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/repo/ai_model_manage.go b/routers/repo/ai_model_manage.go index b122ed460..aaea2fcc6 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.CanAccess(models.UnitTypeCloudBrain) { + if ctx.User.IsAdmin || ctx.Repo.IsAdmin() || ctx.Repo.IsOwner() || ctx.Repo.CanRead(models.UnitTypeCloudBrain) { return true } return false