1
0
mirror of https://github.com/bitwarden/server synced 2026-02-18 18:33:29 +00:00

fix: address TSQL formatting and documentation concerns and a misspelling.

This commit is contained in:
Ike Kottlowski
2026-02-02 16:01:26 -05:00
parent 43ea1a0b35
commit 6b4afa269c
3 changed files with 11 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ public enum EmergencyAccessStatusType : byte
/// </summary>
RecoveryInitiated = 3,
/// <summary>
/// The grantee has excercised their emergency access.
/// The grantee has exercised their emergency access.
/// </summary>
RecoveryApproved = 4,
}

View File

@@ -5,20 +5,20 @@ BEGIN
SET NOCOUNT ON
DECLARE @UserIds AS [GuidIdArray];
DECLARE @BatchSize INT = 100
INSERT INTO @UserIds
SELECT DISTINCT
[GranteeId]
FROM
[dbo].[EmergencyAccess] EA
INNER JOIN
INNER JOIN
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
WHERE
EA.[Status] = 2
AND
EA.[Status] = 2 -- 2 = Bit.Core.Auth.Enums.EmergencyAccessStatusType.Confirmed
AND
EA.[GranteeId] IS NOT NULL
DECLARE @BatchSize INT = 100
-- Delete EmergencyAccess Records
WHILE @BatchSize > 0
@@ -27,7 +27,7 @@ BEGIN
DELETE TOP(@BatchSize) EA
FROM
[dbo].[EmergencyAccess] EA
INNER JOIN
INNER JOIN
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
SET @BatchSize = @@ROWCOUNT

View File

@@ -5,20 +5,20 @@ BEGIN
SET NOCOUNT ON
DECLARE @UserIds AS [GuidIdArray];
DECLARE @BatchSize INT = 100
INSERT INTO @UserIds
SELECT DISTINCT
[GranteeId]
FROM
[dbo].[EmergencyAccess] EA
INNER JOIN
INNER JOIN
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
WHERE
EA.[Status] = 2
AND
EA.[Status] = 2 -- 2 = Bit.Core.Auth.Enums.EmergencyAccessStatusType.Confirmed
AND
EA.[GranteeId] IS NOT NULL
DECLARE @BatchSize INT = 100
-- Delete EmergencyAccess Records
WHILE @BatchSize > 0
@@ -27,7 +27,7 @@ BEGIN
DELETE TOP(@BatchSize) EA
FROM
[dbo].[EmergencyAccess] EA
INNER JOIN
INNER JOIN
@EmergencyAccessIds EAI ON EAI.[Id] = EA.[Id]
SET @BatchSize = @@ROWCOUNT