feat: remove accessType hardcap in migration + style

This commit is contained in:
Alfonso Hernandez
2024-07-19 16:19:45 +02:00
parent 224368b172
commit 4c5c24f689
3 changed files with 6 additions and 4 deletions
@@ -137,7 +137,7 @@ export const secretSharingServiceFactory = ({
}
await secretSharingDAL.updateById(sharedSecretId, { $decr: { expiresAfterViews: 1 } });
}
if (sharedSecret.accessType === SecretSharingAccessType.Organization) {
if (sharedSecret.accessType === SecretSharingAccessType.Organization && orgId === sharedSecret.orgId) {
return { ...sharedSecret, orgName };
}
return { ...sharedSecret, orgName: undefined };