设置非public图片查看权限

This commit is contained in:
呱呱呱
2023-10-18 13:27:09 +08:00
parent 526dac1230
commit 2c4253b04b
2 changed files with 5 additions and 1 deletions

View File

@@ -229,6 +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
end
end