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