diff --git a/libs/common/src/models/export/cipher.export.ts b/libs/common/src/models/export/cipher.export.ts index 7d0ef9e9c3..fa05037539 100644 --- a/libs/common/src/models/export/cipher.export.ts +++ b/libs/common/src/models/export/cipher.export.ts @@ -124,9 +124,9 @@ export class CipherExport { domain.passwordHistory = req.passwordHistory.map((ph) => PasswordHistoryExport.toDomain(ph)); } - domain.creationDate = req.creationDate; - domain.revisionDate = req.revisionDate; - domain.deletedDate = req.deletedDate; + domain.creationDate = req.creationDate ? new Date(req.creationDate) : null; + domain.revisionDate = req.revisionDate ? new Date(req.revisionDate) : null; + domain.deletedDate = req.deletedDate ? new Date(req.deletedDate) : null; return domain; } diff --git a/libs/common/src/vault/models/domain/cipher.ts b/libs/common/src/vault/models/domain/cipher.ts index e6d11a82b6..9cc9226cd4 100644 --- a/libs/common/src/vault/models/domain/cipher.ts +++ b/libs/common/src/vault/models/domain/cipher.ts @@ -353,14 +353,14 @@ export class Cipher extends Domain implements Decryptable { type: this.type, favorite: this.favorite ?? false, organizationUseTotp: this.organizationUseTotp ?? false, - edit: this.edit, + edit: this.edit ?? true, permissions: this.permissions ? { delete: this.permissions.delete, restore: this.permissions.restore, } : undefined, - viewPassword: this.viewPassword, + viewPassword: this.viewPassword ?? true, localData: this.localData ? { lastUsedDate: this.localData.lastUsedDate