mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
@@ -272,11 +272,11 @@ export const secretSharingServiceFactory = ({
|
|||||||
? await secretSharingDAL.findById(sharedSecretId)
|
? await secretSharingDAL.findById(sharedSecretId)
|
||||||
: await secretSharingDAL.findOne({ identifier: sharedSecretId });
|
: await secretSharingDAL.findOne({ identifier: sharedSecretId });
|
||||||
|
|
||||||
const deletedSharedSecret = await secretSharingDAL.deleteById(sharedSecretId);
|
|
||||||
|
|
||||||
if (sharedSecret.orgId && sharedSecret.orgId !== orgId)
|
if (sharedSecret.orgId && sharedSecret.orgId !== orgId)
|
||||||
throw new ForbiddenRequestError({ message: "User does not have permission to delete shared secret" });
|
throw new ForbiddenRequestError({ message: "User does not have permission to delete shared secret" });
|
||||||
|
|
||||||
|
const deletedSharedSecret = await secretSharingDAL.deleteById(sharedSecretId);
|
||||||
|
|
||||||
return deletedSharedSecret;
|
return deletedSharedSecret;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user