mirror of
https://github.com/bitwarden/server.git
synced 2025-06-19 18:38:03 -05:00

* Add signing key repositories, models, and sql migration scripts * Rename UserSigningKeys table to UserSigningKey * Rename signedpublickeyownershipclaim to signedpublickey * Move signedPublicKey to last parameter * Add newline at end of file * Rename to signature key pair * Further rename to signaturekeypair * Rename to UserSignatureKeyPairRepository * Add newline * Rename more instances to UserSignatureKeyPair * Update parameter order * Fix order * Add more renames * Cleanup * Fix sql * Add ef migrations * Fix difference in SQL SP compared to migration SP * Fix difference in SQL SP vs migration * Fix difference in SQL SP vs migration * Attempt to fix sql * Rename migration to start later * Address feedback * Move UserSignatureKeyPair to KM codeownership * Fix build * Fix build * Fix build * Move out entitytypeconfiguration * Use view for reading usersignaturekeypairs * Fix migration script * Fix migration script * Drop view if exists * Enable nullable * Replace with create or alter view * Switch go generatecomb * Switch to generatecomb * Move signature algorithm * Move useresignaturekeypairentitytypeconfiguration to km ownership * Move userSignatureKeyPair model * Unswap file names * Move sql files to km ownership * Add index on userid for signature keys * Fix wrong filename * Remove string length limit * Regenerate EF migrations * Undo changes to program.cs * Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> * Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> * Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> * Update util/Migrator/DbScripts/2025-06-01_00_AddSignatureKeyPairTable.sql Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> * Rename dbset to plural * Update src/Infrastructure.EntityFramework/KeyManagement/Repositories/UserSignatureKeyPairRepository.cs Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> --------- Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com>
41 lines
1.5 KiB
C#
41 lines
1.5 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
using Bit.Core.Entities;
|
|
|
|
namespace Bit.Infrastructure.EFIntegration.Test.Repositories.EqualityComparers;
|
|
|
|
public class UserCompare : IEqualityComparer<User>
|
|
{
|
|
public bool Equals(User x, User y)
|
|
{
|
|
return x.Name == y.Name &&
|
|
x.Email == y.Email &&
|
|
x.EmailVerified == y.EmailVerified &&
|
|
x.MasterPassword == y.MasterPassword &&
|
|
x.MasterPasswordHint == y.MasterPasswordHint &&
|
|
x.Culture == y.Culture &&
|
|
x.SecurityStamp == y.SecurityStamp &&
|
|
x.TwoFactorProviders == y.TwoFactorProviders &&
|
|
x.TwoFactorRecoveryCode == y.TwoFactorRecoveryCode &&
|
|
x.EquivalentDomains == y.EquivalentDomains &&
|
|
x.Key == y.Key &&
|
|
x.PublicKey == y.PublicKey &&
|
|
x.PrivateKey == y.PrivateKey &&
|
|
x.Premium == y.Premium &&
|
|
x.Storage == y.Storage &&
|
|
x.MaxStorageGb == y.MaxStorageGb &&
|
|
x.Gateway == y.Gateway &&
|
|
x.GatewayCustomerId == y.GatewayCustomerId &&
|
|
x.ReferenceData == y.ReferenceData &&
|
|
x.LicenseKey == y.LicenseKey &&
|
|
x.ApiKey == y.ApiKey &&
|
|
x.Kdf == y.Kdf &&
|
|
x.KdfIterations == y.KdfIterations &&
|
|
x.SignedPublicKey == y.SignedPublicKey;
|
|
}
|
|
|
|
public int GetHashCode([DisallowNull] User obj)
|
|
{
|
|
return base.GetHashCode();
|
|
}
|
|
}
|