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