mirror of
https://github.com/bitwarden/server.git
synced 2026-06-01 01:55:55 -05:00
* Added new bank account type, added minimum version logic and sync filters * Formatted changes * changed condition for filtering bank account types * Fixed tests * Updated feature flag * Added comment * updated feature flag and updated dto * update ticket for minimum bank account version * add event types for bank account * fix client version being null bug --------- Co-authored-by: Nick Krantz <nick@livefront.com>
30 lines
862 B
C#
30 lines
862 B
C#
using Bit.Core.Vault.Entities;
|
|
using Bit.Core.Vault.Enums;
|
|
using Bit.Seeder.Models;
|
|
|
|
namespace Bit.Seeder.Factories;
|
|
|
|
internal static class BankAccountCipherSeeder
|
|
{
|
|
internal static Cipher Create(
|
|
string encryptionKey,
|
|
string name,
|
|
BankAccountViewDto bankAccount,
|
|
Guid? organizationId = null,
|
|
Guid? userId = null,
|
|
string? notes = null)
|
|
{
|
|
var cipherView = new CipherViewDto
|
|
{
|
|
OrganizationId = organizationId,
|
|
Name = name,
|
|
Notes = notes,
|
|
Type = CipherTypes.BankAccount,
|
|
BankAccount = bankAccount
|
|
};
|
|
|
|
var encrypted = CipherEncryption.Encrypt(cipherView, encryptionKey);
|
|
return CipherEncryption.CreateEntity(encrypted, encrypted.ToBankAccountData(), CipherType.BankAccount, organizationId, userId);
|
|
}
|
|
}
|