Browse Source

-m增加数据集协作者显示及下载权限。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1
zouap 4 years ago
parent
commit
555330464c
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      routers/repo/dataset.go

+ 7
- 4
routers/repo/dataset.go View File

@@ -38,11 +38,14 @@ func newFilterPrivateAttachments(ctx *context.Context, list []*models.Attachment
permission = true
}
}
isCollaborator, _ := repo.IsCollaborator(ctx.User.ID)
if isCollaborator {
log.Info("Collaborator user may visit the attach.")
permission = true
if !permission {
isCollaborator, _ := repo.IsCollaborator(ctx.User.ID)
if isCollaborator {
log.Info("Collaborator user may visit the attach.")
permission = true
}
}

var publicList []*models.Attachment
for _, attach := range list {
if !attach.IsPrivate {


Loading…
Cancel
Save