From 93dc10b6a5693e89582a8fe074059fd7249851cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=B1=E5=91=B1=E5=91=B1?= Date: Wed, 18 Oct 2023 13:38:09 +0800 Subject: [PATCH] fix attachment_candown --- 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 cedefd1fe..cfce8b7a7 100644 --- a/app/controllers/attachments_controller.rb +++ b/app/controllers/attachments_controller.rb @@ -229,7 +229,7 @@ class AttachmentsController < ApplicationController end tip_exception(403, "您没有权限进入") if project.present? && !candown end - tip_exception(403, "您没有权限查看") if project.present? && !candown if @file.is_public == 0 && author_id != current_user.id + tip_exception(403, "您没有权限查看") if @file.is_public == 0 && @file.author_id != current_user.id end end