|
|
|
@@ -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 { |
|
|
|
|