diff --git a/.npmrc b/.npmrc index 38a7eb153c0..f031c449b21 100644 --- a/.npmrc +++ b/.npmrc @@ -1,4 +1 @@ -save-exact=true -# Increase available heap size to avoid running out of memory when compiling. -# This applies to all npm scripts in this repository. node-options=--max-old-space-size=8192 diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index b675cf52bf8..c5822c9b644 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -65,7 +65,7 @@ export enum FeatureFlag { RiskInsightsForPremium = "pm-23904-risk-insights-for-premium", VaultLoadingSkeletons = "pm-25081-vault-skeleton-loaders", BrowserPremiumSpotlight = "pm-23384-browser-premium-spotlight", - SdkCipherOperations = "use_sdk_cipher_operations", // TODO: Create & use a real feature flag. + SdkCipherOperations = "use-sdk-cipher-operations", // TODO: Create & use a real feature flag. MigrateMyVaultToMyItems = "pm-20558-migrate-myvault-to-myitems", /* Platform */ diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index 20843effe2b..942d32176de 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -968,8 +968,10 @@ export class CipherService implements CipherServiceAbstraction { ); if (sdkCipherEncryptionEnabled) { + console.log("USING THE SDK!"); return await this.updateWithServer_sdk(cipherView, userId, orgAdmin); } else { + console.log("NOT using the SDK!"); const encrypted = await this.encrypt(cipherView, userId); const updatedCipher = await this.updateWithServer_legacy(encrypted, orgAdmin); const updatedCipherView = this.decrypt(updatedCipher, userId); @@ -992,8 +994,11 @@ export class CipherService implements CipherServiceAbstraction { const sdkUpdateRequest = cipher.toSdkUpdateCipherRequest(); let result: SdkCipherView; if (orgAdmin) { - // TODO: Need to expose ciphers admin client in SDK - result = await ref.value.vault().ciphers().edit(sdkUpdateRequest); + result = await ref.value + .vault() + .ciphers() + .admin() + .edit(sdkUpdateRequest, cipher.toSdkCipherView()); } else { result = await ref.value.vault().ciphers().edit(sdkUpdateRequest); }