From c4f380873ee99dbf5f867549ac523b9896e9c503 Mon Sep 17 00:00:00 2001 From: yystopf Date: Mon, 7 Mar 2022 10:20:51 +0800 Subject: [PATCH] fix: is public project attachment allow is not member read --- app/controllers/attachments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb index de5e0a8c..3aa98257 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -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)