fix: is public project attachment allow is not member read

This commit is contained in:
yystopf 2022-03-07 10:20:51 +08:00
parent 5cb2e55f74
commit c4f380873e
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ class AttachmentsController < ApplicationController
if @file.container && current_user.logged?
if @file.container.is_a?(Issue)
course = @file.container.project
candown = course.member?(current_user)
candown = course.member?(current_user) || course.is_public
elsif @file.container.is_a?(Journal)
course = @file.container.issue.project
candown = course.member?(current_user)