From ab982c3e40fb7ca23fda80550cee1c633b94315e Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Tue, 22 Feb 2022 11:00:33 +0800 Subject: [PATCH] fix 1542 --- routers/repo/modelarts.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/routers/repo/modelarts.go b/routers/repo/modelarts.go index b21d633bd..edfa2e4b1 100755 --- a/routers/repo/modelarts.go +++ b/routers/repo/modelarts.go @@ -257,13 +257,15 @@ func NotebookShow(ctx *context.Context) { } var datasetDownloadLink string - if task.Uuid != "" && task.UserID == ctx.User.ID { - attachment, err := models.GetAttachmentByUUID(task.Uuid) - if err == nil { - datasetDownloadLink = attachment.S3DownloadURL() + if ctx.IsSigned { + if task.Uuid != "" && task.UserID == ctx.User.ID { + attachment, err := models.GetAttachmentByUUID(task.Uuid) + if err == nil { + datasetDownloadLink = attachment.S3DownloadURL() + } } } - + ctx.Data["datasetDownloadLink"] = datasetDownloadLink ctx.Data["task"] = task ctx.Data["jobID"] = jobID