fixed issue描述里的附件解析关联,增强附件访问权限控制

This commit is contained in:
2023-10-18 15:16:14 +08:00
committed by 呱呱呱
parent 2e43bab1b5
commit da5972698f
3 changed files with 16 additions and 2 deletions

View File

@@ -23,7 +23,8 @@ class Api::V1::IssuesController < Api::V1::BaseController
before_action :load_issue, only: [:show, :update, :destroy]
before_action :check_issue_operate_permission, only: [:update, :destroy]
def show
def show
@issue.associate_attachment_container
@user_permission = current_user.present? && current_user.logged? && (@project.member?(current_user) || current_user.admin? || @issue.user == current_user)
end