mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 02:52:50 -05:00
Add support for Key Connector OTP and account migration (#1663)
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
This commit is contained in:
@ -31,7 +31,7 @@
|
||||
@RevisionDate DATETIME2(7),
|
||||
@ApiKey VARCHAR(30),
|
||||
@ForcePasswordReset BIT = 0,
|
||||
@UsesCryptoAgent BIT = 0
|
||||
@UsesKeyConnector BIT = 0
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
@ -70,7 +70,7 @@ BEGIN
|
||||
[RevisionDate],
|
||||
[ApiKey],
|
||||
[ForcePasswordReset],
|
||||
[UsesCryptoAgent]
|
||||
[UsesKeyConnector]
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ -106,6 +106,6 @@ BEGIN
|
||||
@RevisionDate,
|
||||
@ApiKey,
|
||||
@ForcePasswordReset,
|
||||
@UsesCryptoAgent
|
||||
@UsesKeyConnector
|
||||
)
|
||||
END
|
||||
|
@ -31,7 +31,7 @@
|
||||
@RevisionDate DATETIME2(7),
|
||||
@ApiKey VARCHAR(30),
|
||||
@ForcePasswordReset BIT = 0,
|
||||
@UsesCryptoAgent BIT = 0
|
||||
@UsesKeyConnector BIT = 0
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
@ -70,7 +70,7 @@ BEGIN
|
||||
[RevisionDate] = @RevisionDate,
|
||||
[ApiKey] = @ApiKey,
|
||||
[ForcePasswordReset] = @ForcePasswordReset,
|
||||
[UsesCryptoAgent] = @UsesCryptoAgent
|
||||
[UsesKeyConnector] = @UsesKeyConnector
|
||||
WHERE
|
||||
[Id] = @Id
|
||||
END
|
||||
|
@ -31,7 +31,7 @@
|
||||
[RevisionDate] DATETIME2 (7) NOT NULL,
|
||||
[ApiKey] VARCHAR (30) NOT NULL,
|
||||
[ForcePasswordReset] BIT NOT NULL,
|
||||
[UsesCryptoAgent] BIT NOT NULL,
|
||||
[UsesKeyConnector] BIT NOT NULL,
|
||||
CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED ([Id] ASC)
|
||||
);
|
||||
|
||||
|
@ -29,7 +29,8 @@ SELECT
|
||||
SU.[ExternalId] SsoExternalId,
|
||||
OU.[Permissions],
|
||||
PO.[ProviderId],
|
||||
P.[Name] ProviderName
|
||||
P.[Name] ProviderName,
|
||||
SS.[Data] SsoConfig
|
||||
FROM
|
||||
[dbo].[OrganizationUser] OU
|
||||
INNER JOIN
|
||||
@ -40,3 +41,5 @@ LEFT JOIN
|
||||
[dbo].[ProviderOrganization] PO ON PO.[OrganizationId] = O.[Id]
|
||||
LEFT JOIN
|
||||
[dbo].[Provider] P ON P.[Id] = PO.[ProviderId]
|
||||
LEFT JOIN
|
||||
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = OU.[OrganizationId]
|
||||
|
@ -14,7 +14,8 @@ SELECT
|
||||
OU.[ExternalId],
|
||||
SU.[ExternalId] SsoExternalId,
|
||||
OU.[Permissions],
|
||||
OU.[ResetPasswordKey]
|
||||
OU.[ResetPasswordKey],
|
||||
U.[UsesKeyConnector]
|
||||
FROM
|
||||
[dbo].[OrganizationUser] OU
|
||||
LEFT JOIN
|
||||
|
Reference in New Issue
Block a user