mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-01 21:44:27 +00:00
fix(security): improve access control and storage security (#518)
* fix(security): improve access control and storage security * fix(security): set NODE_ENV in dockerfiles and sign local storage get urls with lru cache
This commit is contained in:
@@ -1959,7 +1959,12 @@ export class AssetService {
|
||||
const attachmentAsset = await tx.asset.findUnique({
|
||||
where: { id: attachmentId },
|
||||
})
|
||||
if (attachmentAsset) {
|
||||
if (
|
||||
attachmentAsset &&
|
||||
(attachmentAsset.type === AssetType.attachment ||
|
||||
attachmentAsset.type === AssetType.file) &&
|
||||
attachmentAsset.projectId === a.projectId
|
||||
) {
|
||||
await tx.assetCommentAttachment.create({
|
||||
data: {
|
||||
assetId: attachmentAsset.id,
|
||||
|
||||
Reference in New Issue
Block a user