mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-16 01:35:56 +08:00
Merge pull request '新增 uuid' (#229) from KingChan/forgeplus:pm_project_develop into pm_project_develop
This commit is contained in:
@@ -147,7 +147,7 @@ class AttachmentsController < ApplicationController
|
||||
if params[:type] == 'history'
|
||||
AttachmentHistory.find params[:id]
|
||||
else
|
||||
Attachment.find params[:id]
|
||||
Attachment.find params[:id] || Attachment.find_by(uuid: params[:id])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -218,7 +218,7 @@ class AttachmentsController < ApplicationController
|
||||
def attachment_candown
|
||||
unless current_user.admin? || current_user.business?
|
||||
candown = true
|
||||
if @file.container
|
||||
if @file.container && @file.uuid.nil?
|
||||
if @file.container.is_a?(Issue)
|
||||
project = @file.container.project
|
||||
candown = project.is_public || (current_user.logged? && project.member?(current_user))
|
||||
|
||||
Reference in New Issue
Block a user